shared libstdc++ on SVR5, UDK.

Robert Lipe robertlipe@usa.net
Fri Jan 1 22:13:00 GMT 1999


Thelma Lubkin wrote to me privately on Aug 14 that her g++ executables
were much, much larger than those produced by the SCO UDK.  I responded
with a suspicion that the native tools built with shared std c++ libes
(I have now confirmed that is indeed the case) and that EGCS did not.  I
replied that rebuilding EGCS with --enable-shared would help.  I have
now confirmed that alone would not help.  (Sorry, Thelma.)

This patch is necessary to make --enable-shared be productive on System
V Release 5 targets such as Unixware 7 or targets that are closely
related such as the UDK.  I have confirmed that there isn't a shared
libm on these targets, so elfshlibm.ml is still out of the question.

My gut tells me that this patch might be applicable to OpenServer,
but the potential interaction of --enable-shared and multilibs is
mind-numbing.  I briefly considered supporting it if --enable-shared
and --disable-multilib (i.e. --with-gas) but I quickly got over that
impulse.

	* configure.in:  (*-*-sysv5, *-*-*udk*):  Treat like sysv4.

This gets the binary size for "hello, world" down to 21K from 870K.
SCO's tools still sneak in under 7K.  EGCS' Libstdc++ seems to suck in
libm.

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/configure.in,v
retrieving revision 1.13
diff -c -5 -p -u -r1.13 configure.in
--- configure.in	1998/11/26 01:48:34	1.13
+++ configure.in	1999/01/02 05:01:35
@@ -61,11 +61,11 @@ if [ "${shared}" = "yes" ]; then
     *-dec-osf*)		frags="${frags} dec-osf.ml";;
     *-*-hpux*)		frags="${frags} hpux.ml" ;;
     *-*-irix[56]*)	frags="${frags} irix5.ml" ;;
     *-*-linux*aout*)	;;
     *-*-linux*)		frags="${frags} linux.ml" ;;
-    *-*-sysv4*)		frags="${frags} elf.ml" ;;
+    *-*-sysv[45]*|*-*-udk*)	frags="${frags} elf.ml" ;;
     *-*-solaris*)	frags="${frags} sol2shm.ml" ;;
     *-*-sunos4*)	frags="${frags} sunos4.ml" ;;
     *-*-aix*)		frags="${frags} aix.ml" ;;
   esac
 fi


RJL




More information about the Gcc-patches mailing list