From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28867 invoked by alias); 28 Feb 2006 15:59:42 -0000 Received: (qmail 28848 invoked by alias); 28 Feb 2006 15:59:39 -0000 Date: Tue, 28 Feb 2006 16:00:00 -0000 Message-ID: <20060228155939.28847.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/5291] Bad reference to build directory in libstdc++.la In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave at hiauly1 dot hia dot nrc dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg03272.txt.bz2 List-Id: ------- Comment #15 from dave at hiauly1 dot hia dot nrc dot ca 2006-02-28 15:59 ------- Subject: Re: Bad reference to build directory in libstdc++.la > ------- Comment #14 from quanah at stanford dot edu 2006-02-27 22:19 ------- > I've tried the patch suggested in this bug. However, I found that it does > *not* fix all the issues. For example, here is the result of my libstdc++.la > file with the patch applied: > > # Libraries that this one depends upon. > dependency_libs=' > -L/afs/ir/src/pubsw/languages/gcc-build/@sys/x86_64-unknown-linux-gnu/libstdc++-v3/src > -L/afs/ir/src/pubsw/languages/gcc-build/@sys/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs > -lm -lm -lm -L/afs/ir/src/pubsw/languages/gcc-build/@sys/gcc > -L/usr/pubsw/lib/gcc/x86_64-unknown-linux-gnu/4.0.2 -L/usr/local/lib > -L/usr/pubsw/lib -L/lib/../lib64 -L/usr/lib/../lib64 -lgcc_s -lc -lgcc_s -lm > -lgcc_s -lc -lgcc_s' > > > As you can see, there are still *three* references to the build location. I see the same thing without the patch in the installed libstdc++.la. The real kicker is that the -L's for the build directory come before the -L's for the install directory. For an install, the order should be reveresed. > Also, there are an amazing number of -lm's and -lgcc_s's that are unnecessary. > > What I expect this to look like is simply: > > dependency_libs=' -lm -L/usr/pubsw/lib -lgcc_s' > > because, quite frankly, that is all that is necessary. It's my understanding that the extra -lm's and -lgcc_s's are added to handle cyclical dependencies. These may not be present on all systems. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291