Commit bd6a0889 by Eric Christopher

re PR target/24598 (Need to support odcctools and its ablity to use --prefix and libtool)

2006-12-03  Eric Christopher  <echristo@apple.com>

        PR target/24598
        * config/t-slibgcc-darwin: Pass -install_name.
        * config/darwin.h (LINK_COMMAND_SPEC): Remove use of
        libtool. Only pass through options that the linker recognizes.
        (LINK_SPEC): Update comment. Translate options.
        (STARTFILE_SPEC): Add dylib1.o for shared libraries.
        * config/darwin9.h (LINK_COMMAND_SPEC): Ditto above.

From-SVN: r119477
parent d184546c
2006-12-03 Eric Christopher <echristo@apple.com>
PR target/24598
* config/t-slibgcc-darwin: Pass -install_name.
* config/darwin.h (LINK_COMMAND_SPEC): Remove use of
libtool. Only pass through options that the linker recognizes.
(LINK_SPEC): Update comment. Translate options.
(STARTFILE_SPEC): Add dylib1.o for shared libraries.
* config/darwin9.h (LINK_COMMAND_SPEC): Ditto above.
2006-12-03 Dorit Nuzman <dorit@il.ibm.com> 2006-12-03 Dorit Nuzman <dorit@il.ibm.com>
* config/spu/spu.md (smaxv4sf3, sminv4sf3): New. * config/spu/spu.md (smaxv4sf3, sminv4sf3): New.
......
...@@ -230,9 +230,8 @@ extern GTY(()) int darwin_ms_struct; ...@@ -230,9 +230,8 @@ extern GTY(()) int darwin_ms_struct;
linkers, and for positional arguments like libraries. */ linkers, and for positional arguments like libraries. */
#define LINK_COMMAND_SPEC "\ #define LINK_COMMAND_SPEC "\
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \ %(linker) %l %X %{d} %{s} %{t} %{Z} \
%l %X %{d} %{s} %{t} %{Z} \ %{A} %{e*} %{m} %{r} %{x} \
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{o*}%{!o:-o a.out} \ %{o*}%{!o:-o a.out} \
%{!A:%{!nostdlib:%{!nostartfiles:%S}}} \ %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
%{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \ %{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \
...@@ -251,12 +250,9 @@ extern GTY(()) int darwin_ms_struct; ...@@ -251,12 +250,9 @@ extern GTY(()) int darwin_ms_struct;
#endif #endif
/* Please keep the random linker options in alphabetical order (modulo /* Please keep the random linker options in alphabetical order (modulo
'Z' and 'no' prefixes). Options that can only go to one of libtool 'Z' and 'no' prefixes). Note that options taking arguments may appear
or ld must be listed twice, under both !Zdynamiclib and multiple times on a command line with different arguments each time,
Zdynamiclib, with one of the cases reporting an error. */ so put a * after their names so all of them get passed. */
/* Note that options taking arguments may appear multiple times on a
command line with different arguments each time, so put a * after
their names so all of them get passed. */
#define LINK_SPEC \ #define LINK_SPEC \
"%{static}%{!static:-dynamic} \ "%{static}%{!static:-dynamic} \
%{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\ %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\
...@@ -274,20 +270,20 @@ extern GTY(()) int darwin_ms_struct; ...@@ -274,20 +270,20 @@ extern GTY(()) int darwin_ms_struct;
%{keep_private_externs} \ %{keep_private_externs} \
%{private_bundle} \ %{private_bundle} \
} \ } \
%{Zdynamiclib: \ %{Zdynamiclib: -dylib \
%{Zbundle:%e-bundle not allowed with -dynamiclib} \ %{Zbundle:%e-bundle not allowed with -dynamiclib} \
%{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \ %{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \
%{client_name*:%e-client_name not allowed with -dynamiclib} \ %{client_name*:%e-client_name not allowed with -dynamiclib} \
%{compatibility_version*} \ %{compatibility_version*:-dylib_compatibility_version %*} \
%{current_version*} \ %{current_version*:-dylib_current_version %*} \
%{Zforce_cpusubtype_ALL:-arch_only %(darwin_arch)} \ %{Zforce_cpusubtype_ALL:-arch %(darwin_arch)} \
%{!Zforce_cpusubtype_ALL: -arch_only %(darwin_subarch)} \ %{!Zforce_cpusubtype_ALL: -arch %(darwin_subarch)} \
%{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \ %{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \
%{Zinstall_name*:-install_name %*} \ %{Zinstall_name*:-dylib_install_name %*} \
%{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \ %{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \
%{private_bundle:%e-private_bundle not allowed with -dynamiclib} \ %{private_bundle:%e-private_bundle not allowed with -dynamiclib} \
} \ } \
%{Zall_load:-all_load}%{Zdynamiclib:%{!Zall_load:-noall_load}} \ %{Zall_load:-all_load} \
%{Zallowable_client*:-allowable_client %*} \ %{Zallowable_client*:-allowable_client %*} \
%{Zbind_at_load:-bind_at_load} \ %{Zbind_at_load:-bind_at_load} \
%{Zarch_errors_fatal:-arch_errors_fatal} \ %{Zarch_errors_fatal:-arch_errors_fatal} \
...@@ -371,7 +367,8 @@ extern GTY(()) int darwin_ms_struct; ...@@ -371,7 +367,8 @@ extern GTY(()) int darwin_ms_struct;
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \ "%{Zdynamiclib: -ldylib1.o} \
%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \ %{!Zbundle:%{pg:%{static:-lgcrt0.o} \
%{!static:%{object:-lgcrt0.o} \ %{!static:%{object:-lgcrt0.o} \
%{!object:%{preload:-lgcrt0.o} \ %{!object:%{preload:-lgcrt0.o} \
......
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
#undef LINK_COMMAND_SPEC #undef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC "\ #define LINK_COMMAND_SPEC "\
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \ %(linker) %l %X %{d} %{s} %{t} %{Z} \
%l %X %{d} %{s} %{t} %{Z} \ %{A} %{e*} %{m} %{r} %{x} \
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{o*}%{!o:-o a.out} \ %{o*}%{!o:-o a.out} \
%{!A:%{!nostdlib:%{!nostartfiles:%S}}} \ %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
%{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \ %{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \
......
...@@ -16,7 +16,7 @@ SHLIB_LC = -lc ...@@ -16,7 +16,7 @@ SHLIB_LC = -lc
# Note that this version is used for the loader, not the linker; the linker # Note that this version is used for the loader, not the linker; the linker
# uses the stub versions named by $(LIBGCC). # uses the stub versions named by $(LIBGCC).
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
-Wl,-install_name,$(slibdir)/$(SHLIB_INSTALL_NAME) \ -install_name $(slibdir)/$(SHLIB_INSTALL_NAME) \
-single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \ -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
-Wl,-exported_symbols_list,$(SHLIB_MAP) \ -Wl,-exported_symbols_list,$(SHLIB_MAP) \
$(SHLIB_VERSTRING) \ $(SHLIB_VERSTRING) \
......
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