This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Introduce per-package shared-library enabling in gcc/libgcc


Libtool supports --enable-shared=foo,bar,baz to get shared libraries
enabled only in packages foo, bar and baz.  GCC's configure wouldn't
support such arguments to --enable-shared.  With this patch, it does,
so it is possible to --enable-shared=libstdc++-v3, for example, so as
to avoid building a shared libgcc.

I'm checking this in head and branch.  Tested on i686-pc-linux-gnu and
a number of other platforms.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (enable_shared): Support per-package shared-library
	enabling.
	* configure: Rebuilt.

Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.486
diff -u -p -r1.486 configure.in
--- gcc/configure.in 2001/02/16 11:12:45 1.486
+++ gcc/configure.in 2001/02/20 11:23:38
@@ -315,7 +315,21 @@ dwarf2=no)
 
 AC_ARG_ENABLE(shared,
 [  --disable-shared       don't provide a shared libgcc.],
-[], [enable_shared=yes])
+[
+  case $enable_shared in
+  yes | no) ;;
+  *)
+    enable_shared=no
+    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+    for pkg in $enableval; do
+      if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
+        enable_shared=yes
+      fi
+    done
+    IFS="$ac_save_ifs"
+    ;;
+  esac
+], [enable_shared=yes])
 AC_SUBST(enable_shared)
 
 # Determine the host, build, and target systems

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]