From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: Jason Merrill Cc: Jim Wilson , aoliva@cygnus.com, gcc-patches@gcc.gnu.org, binutils@sourceware.cygnus.com Subject: Re: $(build_tooldir)/lib (was Re: http://gcc.gnu.org/ml/gcc-patches/2000-05/msg01104.html) Date: Fri, 21 Jul 2000 07:49:00 -0000 Message-id: <20000721074920.A9966@lucon.org> References: <20000520093135A.mitchell@codesourcery.com> <20000520095133R.mitchell@codesourcery.com> <20000520220957.A25977@valinux.com> <200005222255.PAA26407@wilson.cygnus.com> X-SW-Source: 2000-07/msg00358.html On Fri, Jul 21, 2000 at 01:17:02AM -0700, Jason Merrill wrote: > To resurrect a thread from May... > > Jim Wilson writes: > > > The part of H.J.'s patch that I don't understand is why he adds a > > -B option pointing to a library directory: -B$(build_tooldir)/lib/. > > There are no executables there, so adding a -B option for that directory > > seems wrong and unnecessary. > > Presumably because -B also adds to startfile_prefixes; the same > unlibsubdir problem that caused us to define build_tooldir for > executables would also affect the libraries and startfiles. Exactly. BTW, you won't see it if you use newlib. It is too bad not many people use glibc for cross compiling instead of newlibc. At least, they don't maintain gcc :-(. It is a fun to build a complete cross compiler from Linux/ia32 to Linux/ia64 :-). You will see a few build problems. > > But then why don't we also need a -L$(build_tooldir)/lib? Because -B$(build_tooldir)/lib/ also adds $(build_tooldir)/lib to ld's library search path, why do I need to add it again by -L$(build_tooldir)/lib? H.J.