diff options
author | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 02:10:10 +0000 |
---|---|---|
committer | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 02:10:10 +0000 |
commit | a47cd78650ce6b82271133e1c319674401e0b4cb (patch) | |
tree | 638a02afc406ea4648454e7cceb73bf95b4020b0 /gcc/config/darwin.h | |
parent | 4af16d2d64d17ef2f1a7d2d79908fa537a52faa9 (diff) | |
download | gcc-a47cd78650ce6b82271133e1c319674401e0b4cb.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r-- | gcc/config/darwin.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index c0f9c86e4ec..623ebd81a7e 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -230,9 +230,8 @@ extern GTY(()) int darwin_ms_struct; linkers, and for positional arguments like libraries. */ #define LINK_COMMAND_SPEC "\ %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ - %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \ - %l %X %{d} %{s} %{t} %{Z} \ - %{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \ + %(linker) %l %X %{d} %{s} %{t} %{Z} \ + %{A} %{e*} %{m} %{r} %{x} \ %{o*}%{!o:-o a.out} \ %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \ %{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \ @@ -251,12 +250,9 @@ extern GTY(()) int darwin_ms_struct; #endif /* Please keep the random linker options in alphabetical order (modulo - 'Z' and 'no' prefixes). Options that can only go to one of libtool - or ld must be listed twice, under both !Zdynamiclib and - Zdynamiclib, with one of the cases reporting an error. */ -/* 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. */ + 'Z' and 'no' prefixes). 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 \ "%{static}%{!static:-dynamic} \ %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\ @@ -274,20 +270,20 @@ extern GTY(()) int darwin_ms_struct; %{keep_private_externs} \ %{private_bundle} \ } \ - %{Zdynamiclib: \ + %{Zdynamiclib: -dylib \ %{Zbundle:%e-bundle not allowed with -dynamiclib} \ %{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \ %{client_name*:%e-client_name not allowed with -dynamiclib} \ - %{compatibility_version*} \ - %{current_version*} \ - %{Zforce_cpusubtype_ALL:-arch_only %(darwin_arch)} \ - %{!Zforce_cpusubtype_ALL: -arch_only %(darwin_subarch)} \ + %{compatibility_version*:-dylib_compatibility_version %*} \ + %{current_version*:-dylib_current_version %*} \ + %{Zforce_cpusubtype_ALL:-arch %(darwin_arch)} \ + %{!Zforce_cpusubtype_ALL: -arch %(darwin_subarch)} \ %{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} \ %{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 %*} \ %{Zbind_at_load:-bind_at_load} \ %{Zarch_errors_fatal:-arch_errors_fatal} \ @@ -371,7 +367,8 @@ extern GTY(()) int darwin_ms_struct; #undef STARTFILE_SPEC #define STARTFILE_SPEC \ - "%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \ + "%{Zdynamiclib: -ldylib1.o} \ + %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \ %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ %{!static:%{object:-lgcrt0.o} \ %{!object:%{preload:-lgcrt0.o} \ |