summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-18 07:36:12 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-18 07:36:12 +0000
commitd2b1aa3d9c8d28a1580c0dffe432234b82fdb0c0 (patch)
tree368417271373088d53281198e881ffd8fa908653 /libgcc
parent4c48884edd174292d64bc5f945d2dcc0aed04122 (diff)
downloadgcc-d2b1aa3d9c8d28a1580c0dffe432234b82fdb0c0.tar.gz
2009-11-18 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
PR other/39888 * config/t-slibgcc-darwin: Fix embedded rpaths for --enable-version-specific-runtime-libs, build extension stub libs exposing features available from current libgcc_s. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog8
-rw-r--r--libgcc/config/t-slibgcc-darwin63
2 files changed, 44 insertions, 27 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 54c7fe53302..2a1c9ee71aa 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,4 +1,10 @@
-libgcc/
+2009-11-18 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
+
+ PR other/39888
+ * config/t-slibgcc-darwin: Fix embedded rpaths for
+ --enable-version-specific-runtime-libs, build extension stub
+ libs exposing features available from current libgcc_s.
+
2009-11-11 Jon Beniston <jon@beniston.com>
* config.host: Add lm32 targets.
diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin
index 3dd172367f4..9154b3a72fe 100644
--- a/libgcc/config/t-slibgcc-darwin
+++ b/libgcc/config/t-slibgcc-darwin
@@ -2,9 +2,8 @@
SHLIB_SOVERSION = 1
SHLIB_VERSTRING = -compatibility_version $(SHLIB_SOVERSION) -current_version $(SHLIB_SOVERSION).0
SHLIB_EXT = .dylib
-SHLIB_SUFFIX = `if test @multilib_dir@ = ppc64 ; then echo _@multilib_dir@ ; fi`
-SHLIB_INSTALL_NAME = @shlib_base_name@$(SHLIB_SUFFIX).$(SHLIB_SOVERSION)$(SHLIB_EXT)
-SHLIB_SONAME = @shlib_base_name@.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+SHLIB_INSTALL_NAME = @shlib_base_name@.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+SHLIB_SONAME = @shlib_base_name@$(SHLIB_EXT)
SHLIB_SOLINK = @shlib_base_name@.so
SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
@@ -15,9 +14,10 @@ SHLIB_LC = -lc
# so the libgcc variants have different names not different locations.
# Note that this version is used for the loader, not the linker; the linker
# uses the stub versions named by the versioned members of $(INSTALL_FILES).
+
SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
-install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
- -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
+ -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \
-Wl,-exported_symbols_list,$(SHLIB_MAP) \
$(SHLIB_VERSTRING) \
@multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC)
@@ -26,16 +26,26 @@ SHLIB_MKMAP = $(gcc_srcdir)/mkmap-flat.awk
SHLIB_MKMAP_OPTS = -v leading_underscore=1
SHLIB_MAPFILES += $(gcc_srcdir)/libgcc-std.ver
-INSTALL_FILES=libgcc_s.10.4.dylib libgcc_s.10.5.dylib libgcc_s.1.dylib
+# we're only going to build the stubs if the target slib is /usr/lib
+# there is no other case in which they're useful in a live system.
+ifeq (/usr/lib,$(shlib_slibdir))
+LGCC_STUBS = libgcc_s.10.4.dylib libgcc_s.10.5.dylib
+else
+LGCC_STUBS =
+endif
+
+LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+LGCC_FILES += $(LGCC_STUBS)
+LEXT_STUBS = libgcc_ext.10.4$(SHLIB_EXT) libgcc_ext.10.5$(SHLIB_EXT)
+LGCC_FILES += $(LEXT_STUBS)
+INSTALL_FILES=$(LGCC_FILES)
+
+# we do our own thing
+SHLIB_INSTALL =
# For the toplevel multilib, build a fat archive including all the multilibs.
ifeq ($(MULTIBUILDTOP),)
-SHLIB_INSTALL = \
- $(mkinstalldirs) $(DESTDIR)$(slibdir); \
- $(INSTALL_DATA) $(SHLIB_SONAME) \
- $(DESTDIR)$(slibdir)/$(SHLIB_SONAME)
-
ifeq ($(enable_shared),yes)
all: $(INSTALL_FILES)
install-leaf: install-darwin-libgcc-stubs
@@ -48,35 +58,37 @@ endif
# The actual use of the libraries is controlled by REAL_LIBGCC_SPEC.
#
# This assumes each multilib corresponds to a different architecture.
-libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver libgcc_s$(SHLIB_EXT) all-multi
- $(STRIP) -o $(@)_T \
- -s $(SHLIB_VERPFX).$(*).ver -c -u \
- ./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp
- MLIBS=`$(CC) --print-multi-lib \
- | sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
+libgcc_s.%.dylib : all-multi $(SHLIB_VERPFX).%.ver libgcc_s$(SHLIB_EXT)
+ MLIBS=`$(CC) --print-multi-lib | sed -e 's/;.*$$//'` ; \
for mlib in $$MLIBS ; do \
$(STRIP) -o $(@)_T$${mlib} \
-s $(SHLIB_VERPFX).$(*).ver -c -u \
- ../$${mlib}/libgcc/$${mlib}/libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp || exit 1 ; \
+ ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) || exit 1 ; \
done
$(LIPO) -output $@ -create $(@)_T*
rm $(@)_T*
-libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT): all-multi libgcc_s$(SHLIB_EXT) \
- libgcc_s.10.4.dylib libgcc_s.10.5.dylib
- cp libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp \
- ./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_ || exit 1 ; \
- MLIBS=`$(CC) --print-multi-lib \
- | sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
+libgcc_ext.%.dylib : all-multi $(SHLIB_VERPFX).%.ver libgcc_s$(SHLIB_EXT)
+ MLIBS=`$(CC) --print-multi-lib | sed -e 's/;.*$$//'` ; \
for mlib in $$MLIBS ; do \
- cp ../$${mlib}/libgcc/$${mlib}/libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp \
+ $(STRIP) -o $(@)_T$${mlib} \
+ -R $(SHLIB_VERPFX).$(*).ver -c -urx \
+ ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) || exit 1 ; \
+ done
+ $(LIPO) -output $@ -create $(@)_T*
+ rm $(@)_T*
+
+libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT): all-multi libgcc_s$(SHLIB_EXT)
+ MLIBS=`$(CC) --print-multi-lib | sed -e 's/;.*$$//'` ; \
+ for mlib in $$MLIBS ; do \
+ cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \
./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \
done
$(LIPO) -output libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \
-create libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T*
rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T*
-install-darwin-libgcc-stubs : $(INSTALL_FILES)
+install-darwin-libgcc-stubs :
$(mkinstalldirs) $(DESTDIR)$(slibdir)
for d in $(INSTALL_FILES) ; do \
$(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
@@ -98,7 +110,6 @@ else
# we're putting them in the gcc directory during a build, for
# compatibility with the pre-top-level layout. In that case we
# need symlinks.
-SHLIB_INSTALL =
ifeq ($(enable_shared),yes)
all: install-darwin-libgcc-links