OSDN Git Service

2009-11-30 Tristan Gingold <gingold@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2009 13:42:23 +0000 (13:42 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2009 13:42:23 +0000 (13:42 +0000)
* gcc-interface/Makefile.in: Do not link with -static-libgcc on Darwin.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154799 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in

index 2090693..eab6c1c 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-30  Tristan Gingold  <gingold@adacore.com>
+
+        * gcc-interface/Makefile.in: Do not link with -static-libgcc on Darwin.
+
 2009-11-30  Emmanuel Briot  <briot@adacore.com>
 
        * gnat_ugn.texi: Extend doc for -eL
 2009-11-30  Emmanuel Briot  <briot@adacore.com>
 
        * gnat_ugn.texi: Extend doc for -eL
index 5bb9900..0998226 100644 (file)
@@ -190,6 +190,11 @@ TOOLSCASE =
 MULTISUBDIR =
 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
 
 MULTISUBDIR =
 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
 
+# Link flags used to build gnat tools.  By default we prefer to statically
+# link with libgcc to avoid a dependency on shared libgcc (which is tricky
+# to deal with as it may conflict with the libgcc provided by the system).
+GCC_LINK_FLAGS=-static-libgcc
+
 # End of variables for you to override.
 
 all: all.indirect
 # End of variables for you to override.
 
 all: all.indirect
@@ -2116,6 +2121,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
   LIBRARY_VERSION := $(LIB_VERSION)
   soext = .dylib
   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
   LIBRARY_VERSION := $(LIB_VERSION)
   soext = .dylib
+  GCC_LINK_FLAGS=
 endif
 
 ifneq ($(EH_MECHANISM),)
 endif
 
 ifneq ($(EH_MECHANISM),)
@@ -2182,7 +2188,7 @@ ADA_INCLUDE_SRCS =\
 
 LIBGNAT=../$(RTSDIR)/libgnat.a
 
 
 LIBGNAT=../$(RTSDIR)/libgnat.a
 
-GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
+GCC_LINK=$(CC) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
 
 # when compiling the tools, the runtime has to be first on the path so that
 # it hides the runtime files lying with the rest of the sources
 
 # when compiling the tools, the runtime has to be first on the path so that
 # it hides the runtime files lying with the rest of the sources