default library search path(s) for gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

Short question:

Is there a configure option akin to --with-local-prefix
which tells gcc to look in /usr/local/lib for -libs even
as GCC is installed in /some/other/place?  For, as I read
(and experience) --with-local-prefix affect include, not
library search paths.  

Background:

Moving from SunOS5.8 to 5.10 and from sparc to x86.
Had previously built gcc with configure --prefix=/usr/local and
then installed it first to make my svr4 packages.

This time around, I'm trying to be more regular and am
putting packages in /usr/local/pkg/, and then building
them into svr4 packages directly from their destination.

Seems to work, but for one hic with gcc.

Seems I've gotten very fond of not having to say -L /usr/local/lib
-R /usr/local/lib in my Makefiles.  If I understand correctly,
gcc (gcc.c, the compiler driver) takes care of this because
--libdir is set to prefix/lib, and when --prefix=/usr/local all
just works out.  

However (and here is where I need to confirm my understanding),
gcc looks in /usr/local/lib because that is where it expects to
find it's own libraries.  It just happens that when libdir is 
/usr/local/lib that this works to custom.  If I install GCC
in another place, then gcc will look there/lib to find GCC's
libraries but not local system libs in /usr/local/lib for -llibs
that I pust on the gcc command line.

This is different from the behavior for includes, where the
default valure of --with-local-prefix is /usr/local, so that
include files are looked for in /usr/local/include, even if
GCC is installed in /outer/asteroidbelt.

If I have this correct, is there an option I've overlooked to 
set an additional local system library path?

If not, would setting LIBRARY_PATH before configure do it?

Thanks,
-sam

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux