t-slibgcc-darwin: Don't put shared libraries in directories other than $(slibdir).

* config/t-slibgcc-darwin: Don't put shared libraries in
	directories other than $(slibdir).
	* config/rs6000/darwin.h: Find -m64 libgcc under the name the
	OS uses for it.

From-SVN: r97991
This commit is contained in:
Geoffrey Keating 2005-04-11 23:30:44 +00:00 committed by Geoffrey Keating
parent f8d66d34f7
commit dcc58b08a0
3 changed files with 36 additions and 16 deletions

View File

@ -1,3 +1,10 @@
2005-04-11 Geoffrey Keating <geoffk@apple.com>
* config/t-slibgcc-darwin: Don't put shared libraries in
directories other than $(slibdir).
* config/rs6000/darwin.h: Find -m64 libgcc under the name the
OS uses for it.
2005-04-11 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/20933

View File

@ -397,6 +397,14 @@ extern const char *darwin_one_byte_bool;
#undef REGISTER_TARGET_PRAGMAS
#define REGISTER_TARGET_PRAGMAS DARWIN_REGISTER_TARGET_PRAGMAS
/* Just like config/darwin.h's REAL_LIBGCC_SPEC, but use -lgcc_s_ppc64 for
-m64. */
#undef REAL_LIBGCC_SPEC
#define REAL_LIBGCC_SPEC \
"%{static|static-libgcc:-lgcc -lgcc_eh; \
:%{shared-libgcc|Zdynamiclib:%{m64:-lgcc_s_ppc64;:-lgcc_s} -lgcc; \
:-lgcc -lgcc_eh}}"
#ifdef IN_LIBGCC2
#include <stdbool.h>
#endif

View File

@ -3,35 +3,40 @@ SHLIB_MINOR = 1
SHLIB_REVISION = 0
SHLIB_VERSTRING = -compatibility_version $(SHLIB_MINOR) -current_version $(SHLIB_MINOR).$(SHLIB_REVISION)
SHLIB_EXT = .dylib
SHLIB_SOLINK = @shlib_base_name@.dylib
SHLIB_SONAME = @shlib_base_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
SHLIB_SUFFIX = `if test @multilib_dir@ != . ; then echo _@multilib_dir@ ; fi`
SHLIB_SOLINK = @shlib_base_name@$(SHLIB_SUFFIX)$(SHLIB_EXT)
SHLIB_SONAME = @shlib_base_name@$(SHLIB_SUFFIX).$(SHLIB_MINOR).$(SHLIB_REVISION)$(SHLIB_EXT)
SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
# Darwin only searches in /usr/lib for shared libraries, not in subdirectories,
# so the libgcc variants have different names not different locations.
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
-Wl,-install_name,$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME) \
-Wl,-flat_namespace -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
-Wl,-install_name,$(slibdir)/$(SHLIB_SONAME) \
-Wl,-flat_namespace -o $(SHLIB_SONAME).tmp \
-Wl,-exported_symbols_list,$(SHLIB_MAP) \
$(SHLIB_VERSTRING) \
@multilib_flags@ $(SHLIB_OBJS) -lc && \
rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
rm -f $(SHLIB_SOLINK) $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
if [ -f $(SHLIB_SONAME) ]; then \
mv -f $(SHLIB_SONAME) $(SHLIB_SONAME).backup; \
else true; fi && \
mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
$(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
mv $(SHLIB_SONAME).tmp $(SHLIB_SONAME) && \
$(LN_S) $(SHLIB_SONAME) $(SHLIB_SOLINK) && \
if [ $(SHLIB_DIR) != . ] ; then \
$(LN_S) `pwd`/$(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) ; \
else true; fi
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
$$(mkinstalldirs) $$(DESTDIR)$$(slibdir); \
$(INSTALL_DATA) $(SHLIB_SONAME) \
$$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \
rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_SOLINK); \
$(LN_S) $(SHLIB_SONAME) \
$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
$$(DESTDIR)$$(slibdir)/$(SHLIB_SOLINK)
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
SHLIB_MKMAP_OPTS = -v leading_underscore=1
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver