On Sun, Aug 29, 1999 at 11:00:17AM -0700, David O'Brien wrote:
> > I'd like to remove the search paths altogether, leaving the gcc
> > LIB_SPEC and LD_LIBRARY_PATH environment variable to get the /right/
> > path all the time.
> Can you post a patch first?  IIRC jdp wanted to be more "pure" with ld.so
> finding shared libs.  Many didn't like the more "pure" searching.  I
> really can't tell what the result of your proposed changes would be.

I found my own objection 8-).

I was proposing to simply remove the SEARCH_DIR() lines in the linker
scripts on the assumption that gcc (and egcs) knows about /usr/lib.
What I didn't check before sending the original email was that gcc
actually passes -L/usr/lib to ld. It doesn't, despite the fact that
gcc -print-search-dirs reports /usr/lib as a search directory.
Even with -nostdlib, gcc still passes the built-in search paths to
ld, except for /usr/lib. Yuck.

The conclusion that I reached was that the gcc sources would need
to be changed to pass -L/usr/lib to ld and that if I did this,
we would have a build problem where ld would be built without
the searching before the new gcc. I don't think Cygnus would want
this sort of change, and I'm certain FreeBSD users don't want the
chicken-an-egg build problem.

I found this problem building cross tools. I've settled (for the time
being) on leaving a single SEARCH_DIR() in the linker script for
/usr/lib or the cross-build library path depending on which target
I'm building for. I think I'm at the point where I have all the binutils
stuff configured to be able to build i386, m68k, powerpc, mips and sparc
(and alpha only on alpha) hosted on FreeBSD, targeted to LynxOS, VxWorks,
RTEMS, WinNT, NetBSD, Linux, SunOS, ...

I'm still trying to find a simple way to build gcc/egcs for each based
on the way you build FreeBSD's host compiler.

John Birrell - [EMAIL PROTECTED]; [EMAIL PROTECTED] http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to