public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* default library search path(s) for gcc
@ 2004-10-01  4:43 Sam C. Nicholson !!
  0 siblings, 0 replies; only message in thread
From: Sam C. Nicholson !! @ 2004-10-01  4:43 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-01  4:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01  4:43 default library search path(s) for gcc Sam C. Nicholson !!

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).