From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Jelinek To: Ian Lance Taylor Cc: rth@cygnus.com, binutils@sourceware.cygnus.com Subject: Re: [RFC] Adding --skip-mismatch option to ld Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <19990609163754.V949@mff.cuni.cz> References: <19990604171207.W949@mff.cuni.cz> <19990607120530.A13793@cygnus.com> <19990608213144.561.qmail@daffy.airs.com> <19990608204932.E7246@cygnus.com> <19990609041411.1632.qmail@daffy.airs.com> <19990609041411.1632.qmail@daffy.airs.com> X-SW-Source: 1999-q2/msg00195.html On Wed, Jun 09, 1999 at 12:14:11AM -0400, Ian Lance Taylor wrote: > Date: Tue, 8 Jun 1999 20:49:32 -0700 > From: Richard Henderson > > On Tue, Jun 08, 1999 at 05:31:44PM -0400, Ian Lance Taylor wrote: > > 2) I don't understand why it's needed. Changing the default search > > path, as is done by the first half of the patch, sounds like the > > right approach to me. Irix faces these exact issues with its > > multiple ABIs, yet it does not need this option. > > That works for system directories, but not /usr/local/lib and other > such places under user control. One could argue that we simply need > to teach old users new tricks. > > I don't see how it works for /usr/local/lib anyhow. If you expect to > find the library in /usr/local/lib, but the wrong library is there, > then as far as I can see you won't find the library at all. If you > need to find it in some other directory, you will need to add a -L > option, and if you do that it will work anyhow. I don't claim the users can link their programs as they want even without that patch (with the exception of the elf64_sparc.sh hunk which is needed), but I wanted to make it convenient for the users so that we don't have to fix zillions of configure scripts and Makefiles to teach them about different ABIs. One example: on sparc64, say the distribution will give the users the choice to install all libraries in both ABIs, so the installer will nicely polulate both */lib and */lib64 trees. But then a user will compile his own package in 64bit and install it, its library will go say into /usr/lib. Say he compiles yet another package (again 64bit) whose configure will look for that library, find it in /usr/lib and add /usr/lib to the list to be passed as -L into LDFLAGS. And now you have problem, because the -L/usr/lib will come before the system libraries which include /usr/lib64, so the link will not succeed. Yes, it can be solved e.g. by adding -L/usr/lib64 before -L/usr/lib, but I suppose many people will be horribly confused by that. Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz Administrator of SunSITE Czech Republic, MFF, Charles University ___________________________________________________________________ UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/ Linux version 2.3.4 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________