Commit fb49f596 by Eric Christopher

t-slibgcc-darwin: Rewrite.

2006-07-10  Eric Christopher  <echristo@apple.com>

	* config/t-slibgcc-darwin: Rewrite.

From-SVN: r115325
parent 79908c99
2006-07-10 Eric Christopher <echristo@apple.com>
* config/t-slibgcc-darwin: Rewrite.
2006-07-10 Laurynas Biveinis <laurynas.biveinis@gmail.com>
PR bootstrap/20437
......@@ -60,7 +64,7 @@
* gcc-common.c (ggc_free_overhead, dump_gcc_loc_statistics): Likewise.
* tree-ssa-dce.c (clear_control_dependence_bitmap): Likewise.
* rtl.c (dump_rtx_statistics): Likewise.
* tree-ssa-structalias.c (sort_fieldstack, init_alias_heapvars):
* tree-ssa-structalias.c (sort_fieldstack, init_alias_heapvars):
Likewise.
* varray.c (dump_varray_statistics): Likewise.
* dfp.c (encode_decimal32, decode_decimal32, encode_decimal64,
......@@ -83,7 +87,7 @@
2006-07-06 Roger Sayle <roger@eyesopen.com>
PR target/27968
* configure.ac (HAVE_AS_IX86_FFREEP): On x86 targets check whether
* configure.ac (HAVE_AS_IX86_FFREEP): On x86 targets check whether
the configured assembler supports the x87's ffreep mnemonic.
* configure: Regenerate.
* config.in: Regenerate.
......@@ -162,7 +166,7 @@
* tree-ssa-math-opts.c (execute_cse_reciprocals): Fix calls
to calculate and free the dominator information.
2006-07-04 Peter O'Gorman <peter@pogma.com>
* mklibgcc.in: chmod 644 before ranlib during install.
......@@ -260,7 +264,7 @@
PR c++/19134
* tree.c (build_decl_stat): Don't hande #pragma visibility here.
* c-common.c (c_determine_visibility): Handle it here.
* c-decl.c (finish_decl): Call c_determine_visibility for
* c-decl.c (finish_decl): Call c_determine_visibility for
functions, too.
* flags.h (enum symbol_visibility): Sort from most to least visibility.
* tree.h: Likewise.
......@@ -286,7 +290,7 @@
PR target/25765
* config/i386/i386.c (ix86_output_function_epilogue): Don't
insert a label at the end of an function under Mach-O.
2006-06-29 Eric Christopher <echristo@apple.com>
Evan Cheng <evan.cheng@apple.com>
......
......@@ -2,26 +2,28 @@
SHLIB_SOVERSION = 1
SHLIB_VERSTRING = -compatibility_version $(SHLIB_SOVERSION) -current_version $(SHLIB_SOVERSION).0
SHLIB_EXT = .dylib
SHLIB_SUFFIX = `if test @multilib_dir@ != . ; then echo _@multilib_dir@ ; fi`
SHLIB_SONAME = @shlib_base_name@$(SHLIB_SUFFIX).$(SHLIB_SOVERSION)$(SHLIB_EXT)
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_SOLINK = @shlib_base_name@.so
SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@
SHLIB_LC = -lc
# Darwin only searches in /usr/lib for shared libraries, not in subdirectories,
# 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 $(LIBGCC).
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
-Wl,-install_name,$(slibdir)/$(SHLIB_SONAME) \
-single_module -o $(SHLIB_SONAME).tmp \
-Wl,-install_name,$(slibdir)/$(SHLIB_INSTALL_NAME) \
-single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
-Wl,-exported_symbols_list,$(SHLIB_MAP) \
$(SHLIB_VERSTRING) \
@multilib_flags@ $(SHLIB_OBJS) -lc && \
if [ -f $(SHLIB_SONAME) ]; then \
mv -f $(SHLIB_SONAME) $(SHLIB_SONAME).backup; \
else true; fi && \
mv $(SHLIB_SONAME).tmp $(SHLIB_SONAME)
@multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
if [ -f stmp-lipo ]; then \
rm -f stmp-lipo; \
else true; fi
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
......@@ -42,10 +44,10 @@ ASM_HIDDEN_OP = .private_extern
# each system version supported. They are 'stub' libraries that
# contain no code, just a list of exported symbols.
# 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.a
# When builting multilibbed target libraries, all the required
# When building multilibbed target libraries, all the required
# libraries are expected to exist in the multilib directory.
MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
| sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
......@@ -54,22 +56,44 @@ libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver libgcc.a
$(LN_S) ../$@ $${mlib}/$@ || exit 1 ; \
done
MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
| sed -e 's/;.*$$//' -e '/^\.$$/d' -e 's/^/_/'` ; \
| sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
for mlib in '' $$MLIBS ; do \
$(STRIP_FOR_TARGET) -o $(@)_T$${mlib} \
-s $(SHLIB_VERPFX).$(*).ver -c -u \
libgcc_s$${mlib}.$(SHLIB_SOVERSION)$(SHLIB_EXT) || exit 1 ; \
./$${mlib}/libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp || exit 1 ; \
done
$(LIPO_FOR_TARGET) -output $@ -create $(@)_T*
rm $(@)_T*
stmp-lipo: libgcc_s.10.4.dylib libgcc_s.10.5.dylib
# When building multilibbed target libraries, all the required
# libraries are expected to exist in the multilib directory.
MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
| sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
for mlib in '' $$MLIBS ; do \
cp ./$${mlib}/libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT).tmp \
./libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} || exit 1 ; \
done
$(LIPO_FOR_TARGET) -output libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \
-create libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T*
rm libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T*
$(STAMP) stmp-lipo
# From the point-of-view of the Makefiles, libgcc is built by the 'strip'
# and 'lipo' commands above.
LIBGCC=libgcc_s.10.4.dylib libgcc_s.10.5.dylib
LIBGCC=stmp-lipo
INSTALL_FILES=libgcc_s.10.4.dylib libgcc_s.10.5.dylib libgcc_s.1.dylib
install-darwin-libgcc-stubs : $(LIBGCC) installdirs
for d in $(LIBGCC) ; do \
install-darwin-libgcc-stubs : $(INSTALL_FILES) installdirs install-multilib \
stmp-lipo
for d in $(INSTALL_FILES) ; do \
$(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
done
if [ -f $(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib ]; then \
rm -f $(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib; \
else true; fi
$(LN_S) ./libgcc_s.1.dylib \
$(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib
INSTALL_LIBGCC += install-darwin-libgcc-stubs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment