diff options
author | Devang Patel <dpatel@gcc.gnu.org> | 2002-12-19 15:46:49 -0800 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2002-12-19 15:46:49 -0800 |
commit | 3ab68120e2c7f48ff4de37f103800d0a2385d31c (patch) | |
tree | 2f5dbeda7efb4dbc70659b7100dee20daf5c1fc1 | |
parent | b2dfd40f472d34141d32e9062e3553f1e8a9e3e5 (diff) | |
download | gcc-3ab68120e2c7f48ff4de37f103800d0a2385d31c.zip gcc-3ab68120e2c7f48ff4de37f103800d0a2385d31c.tar.gz gcc-3ab68120e2c7f48ff4de37f103800d0a2385d31c.tar.bz2 |
Add support for darwin linker option -dynamic.
From-SVN: r60341
-rw-r--r-- | gcc/config/darwin.h | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/darwin.h | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/darwin-ld-5.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index a3dcc16..88efab4 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -100,7 +100,6 @@ Boston, MA 02111-1307, USA. */ name, that also takes an argument, needs to be modified so the prefix is different, otherwise a '*' after the shorter option will match with the longer one. */ -/* Ignore -dynamic for now */ #define TARGET_OPTION_TRANSLATE_TABLE \ { "-all_load", "-Zall_load" }, \ { "-allowable_client", "-Zallowable_client" }, \ @@ -111,7 +110,7 @@ Boston, MA 02111-1307, USA. */ { "-weak_reference_mismatches", "-Zweak_reference_mismatches" }, \ { "-dependency-file", "-MF" }, \ { "-dylib_file", "-Zdylib_file" }, \ - { "-dynamic", " " }, \ + { "-dynamic", "-Zdynamic" }, \ { "-dynamiclib", "-Zdynamiclib" }, \ { "-exported_symbols_list", "-Zexported_symbols_list" }, \ { "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \ @@ -174,7 +173,7 @@ Boston, MA 02111-1307, USA. */ /* Machine dependent cpp options. */ #undef CPP_SPEC -#define CPP_SPEC "%{static:-D__STATIC__}%{!static:-D__DYNAMIC__}" +#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}" /* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus precomp, libtool, and fat build additions. Also we @@ -234,6 +233,7 @@ Boston, MA 02111-1307, USA. */ %{Zbind_at_load:-bind_at_load} \ %{Zarch_errors_fatal:-arch_errors_fatal} \ %{Zdylib_file*:-dylib_file %*} \ + %{Zdynamic:-dynamic}\ %{Zexported_symbols_list*:-exported_symbols_list %*} \ %{Zflat_namespace:-flat_namespace} \ %{headerpad_max_install_names*} \ diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 73041a2..b3468f2 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -58,7 +58,9 @@ Boston, MA 02111-1307, USA. */ /* We want -fPIC by default, unless we're using -static to compile for the kernel or some such. */ -#define CC1_SPEC "%{!static:-fPIC}" +#define CC1_SPEC "\ +%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\ +%{!static:-fPIC}" /* Make both r2 and r3 available for allocation. */ #define FIXED_R2 0 diff --git a/gcc/testsuite/gcc.dg/darwin-ld-5.c b/gcc/testsuite/gcc.dg/darwin-ld-5.c index e32f1d9..0540f92 100644 --- a/gcc/testsuite/gcc.dg/darwin-ld-5.c +++ b/gcc/testsuite/gcc.dg/darwin-ld-5.c @@ -1,7 +1,7 @@ -/* Test Darwin linker option -bundle_loader. */ +/* Test Darwin linker option -dynamic. */ /* Developed by Devang Patel <dpatel@apple.com>. */ -/* { dg-options "-bundle -bundle_loader foo" } */ +/* { dg-options "-dynamic" } */ /* { dg-do link { target *-*-darwin* } } */ int main() |