From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4400 invoked by alias); 1 Oct 2004 04:43:41 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 4382 invoked from network); 1 Oct 2004 04:43:39 -0000 Received: from unknown (HELO nimbus.webrelay.net) (66.243.72.15) by sourceware.org with SMTP; 1 Oct 2004 04:43:39 -0000 Received: from webrelay.net (localhost [127.0.0.1]) by nimbus.webrelay.net (Postfix) with ESMTP id 6E7FC38026 for ; Fri, 1 Oct 2004 00:43:38 -0400 (EDT) To: gcc-help@gcc.gnu.org Subject: default library search path(s) for gcc Date: Fri, 01 Oct 2004 04:43:00 -0000 From: "Sam C. Nicholson !!" Message-Id: <20041001044338.6E7FC38026@nimbus.webrelay.net> X-SW-Source: 2004-10/txt/msg00001.txt.bz2 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