This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATH for libstdc++ Makefile
- To: mark at markmitchell dot com
- Subject: Re: PATH for libstdc++ Makefile
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Tue, 22 Sep 1998 12:36:42 +0200 (MET DST)
- Cc: egcs-patches at cygnus dot com, law at cygnus dot com
- References: <199809220757.AAA31000@smtp.earthlink.net>
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On Tue, 22 September 1998, 00:57:30, mark@markmitchell.com wrote:
>
> I just got bitten by an odd situation. The line to build libstdc++.so
> is something like:
>
> xgcc -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates
> -Wl,-soname,libstdc++-libc6.0-1.so.2 -shared -o
> libstdc++-2-libc6.0-1-2.9.0.so `cat piclist` -lm
>
> But, this passes `-lgcc' to the linker and the directories searched do
> not include the directory containing the recently built libgcc.a.
> Therefore, you get whatever libgcc.a is lying around in
> /usr/local/lib, etc.
>
> Jeff, OK?
Though I'm not Jeff, but the patch doesn't work for multilib
configurations. Are you actually sure there is a problem? I just
checked my 1.1 build on Solaris 2.5.1, and the line looks:
/u/b60/manfred/work/GNU/build/romy/egcs-1.1-sparc-sun-solaris2.5.1/gcc/xgcc \
-B/u/b60/manfred/work/GNU/build/romy/egcs-1.1-sparc-sun-solaris2.5.1/gcc/ \
-O9 -g -D__EXTENSIONS__ -fno-implicit-templates -h libstdc++.so.2.9.0 \
-shared -o libstdc++.so.2.9.0 `cat piclist` -lm
As you can see, it's not just calling xgcc but passing the appropriate
-B..., too, which will make xgcc linking the proper libgcc.a if
necessary. So, why is it's not passing -B... for you?
manfred
>
> --
> Mark Mitchell mark@markmitchell.com
> Mark Mitchell Consulting http://www.markmitchell.com
>
> 1998-09-21 Mark Mitchell <mark@markmitchell.com>
>
> * Makefile.in ($(SHLIB)): Avoid getting bad libgcc.a's.
>
> Index: Makefile.in
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/Makefile.in,v
> retrieving revision 1.22
> diff -c -p -r1.22 Makefile.in
> *** Makefile.in 1998/09/17 00:30:53 1.22
> --- Makefile.in 1998/09/22 03:10:12
> *************** marlink:
> *** 96,102 ****
> @$(MAKE) $(MARLINK) "ARLINK=$(MARLINK)"
>
> $(SHLIB): piclist
> ! $(CC) $(LIBCXXFLAGS) $(SHFLAGS) -shared -o $(SHLIB) `cat piclist` $(SHDEPS)
>
> $(SHARLIB): $(SHLIB)
> -rm -f t$(SHARLIB)
> --- 96,102 ----
> @$(MAKE) $(MARLINK) "ARLINK=$(MARLINK)"
>
> $(SHLIB): piclist
> ! $(CC) -L ../../gcc $(LIBCXXFLAGS) $(SHFLAGS) -shared -o $(SHLIB) `cat piclist` $(SHDEPS)
>
> $(SHARLIB): $(SHLIB)
> -rm -f t$(SHARLIB)