Hard links

Andrew Stubbs Andrew.Stubbs@st.com
Wed Jun 20 02:15:00 GMT 2001


On Tue, 19 Jun 2001 jjohnstn@cygnus.com wrote:

> Andrew Stubbs wrote:
> > 
> > There are several places in the newlib make file which use hard links.
> > Unfortunatly the ln command seems to be a bit flakey with the file system
> > I am using - sometimes it works and sometimes not, it depends on which
> > directory it is in.
> > 
> > This is not a problem for GCC as configure checks whether ln works and I
> > can force it to use cp instead (by setting gcc_cv_prog_LN=cp).
> > 
> > Are the hard links used by newlib absolutly necessary? If so could newlib
> > please be modified to solve my problem?
> > 
> 
> Actually, there are already tests in the Makefiles so that cp is used to back up the ln operation if
> it fails.  It is unfortunate that your ln is not returning failure in those cases.  Have you
> considered just aliasing ln to cp?  AFAICT, there are no option flags being used by newlib.
> 
> I did manage to find two cases in the top level Makefile.am where cp was not being used to back up
> ln.  If you are interested, I have attached a patch which fixes these two situations.  You apply it
> in the top level newlib directory:
> 
>   patch -u -p0 <ln.patch
> 
> -- Jeff J.

I wasn't certain that it didn't /require/ ln, as opposed to cp. Thanks for
clearing this up for me.

------------------------------------------------------------------------
|  Andrew Stubbs,                   |  E-mail: Andrew.Stubbs@st.com    |
|  STMicroelectronics Ltd.,         |  or      stubbsa@bristol.st.com  |
|  1000 Aztec West,                 |                                  |
|  Almondsbury,                     |  Tel:    +44 (0)1454 462325      |
|  Bristol, BS32 4SQ, U.K.          |  Fax:    +44 (0)1454 617910      |
------------------------------------------------------------------------



More information about the Newlib mailing list