From 965a7e9092ffbec64865a95b016f731782d4b965 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Sat, 30 Oct 2004 02:48:49 +0000 Subject: [PATCH] darwin.h (ASM_SPEC): Simplify. * config/i386/darwin.h (ASM_SPEC): Simplify. (SUBTARGET_EXTRA_SPECS): Add darwin_subarch spec. * config/rs6000/darwin.h (DARWIN_SUBARCH_SPEC): New. (SUBTARGET_EXTRA_SPECS): Add darwin_subarch spec. * config/darwin.h (LINK_COMMAND_SPEC): Don't pass -arch here. (LINK_SPEC): Do pass -arch here. Handle -force_cpusubtype_ALL in all cases. Pass the right -arch or -arch_only based on -mcpu. (ASM_SPEC): Handle -force_cpusubtype_ALL. * doc/invoke.texi (Darwin Options): Improve documentation for Darwin linker (and libtool) switches. From-SVN: r89877 --- gcc/ChangeLog | 11 +++++++++++ gcc/config/darwin.h | 11 ++++++----- gcc/config/i386/darwin.h | 13 +++++-------- gcc/config/rs6000/darwin.h | 22 +++++++++++++++++++++- gcc/doc/invoke.texi | 33 +++++++++++++++++++++++---------- gcc/tree-ssa-operands.c | 2 ++ 6 files changed, 68 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ac0249c556..2dd6438805c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -43,6 +43,17 @@ 2004-10-29 Geoffrey Keating + * config/i386/darwin.h (ASM_SPEC): Simplify. + (SUBTARGET_EXTRA_SPECS): Add darwin_subarch spec. + * config/rs6000/darwin.h (DARWIN_SUBARCH_SPEC): New. + (SUBTARGET_EXTRA_SPECS): Add darwin_subarch spec. + * config/darwin.h (LINK_COMMAND_SPEC): Don't pass -arch here. + (LINK_SPEC): Do pass -arch here. Handle -force_cpusubtype_ALL + in all cases. Pass the right -arch or -arch_only based on -mcpu. + (ASM_SPEC): Handle -force_cpusubtype_ALL. + * doc/invoke.texi (Darwin Options): Improve documentation for + Darwin linker (and libtool) switches. + * config/rs6000/darwin-fallback.c: Include . 2004-10-29 Stan Shebs diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 098caa2d76d..83aa2ddb009 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -219,8 +219,6 @@ extern const char *darwin_fix_and_continue_switch; #define LINK_COMMAND_SPEC "\ %{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \ - %{!Zdynamiclib:-arch %(darwin_arch)} \ - %{Zdynamiclib:-arch_only %(darwin_arch)} \ %l %X %{d} %{s} %{t} %{Z} \ %{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \ %{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \ @@ -240,13 +238,14 @@ extern const char *darwin_fix_and_continue_switch; "%{static}%{!static:-dynamic} \ %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\ %{!Zdynamiclib: \ + %{Zforce_cpusubtype_ALL:-arch %(darwin_arch) -force_cpusubtype_ALL} \ + %{!Zforce_cpusubtype_ALL:-arch %(darwin_subarch)} \ %{Zbundle:-bundle} \ %{Zbundle_loader*:-bundle_loader %*} \ %{client_name*} \ %{compatibility_version*:%e-compatibility_version only allowed with -dynamiclib\ } \ %{current_version*:%e-current_version only allowed with -dynamiclib} \ - %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \ %{Zforce_flat_namespace:-force_flat_namespace} \ %{Zinstall_name*:%e-install_name only allowed with -dynamiclib} \ %{keep_private_externs} \ @@ -258,7 +257,8 @@ extern const char *darwin_fix_and_continue_switch; %{client_name*:%e-client_name not allowed with -dynamiclib} \ %{compatibility_version*} \ %{current_version*} \ - %{Zforce_cpusubtype_ALL:%e-force_cpusubtype_ALL not allowed with -dynamiclib} \ + %{Zforce_cpusubtype_ALL:-arch_only %(darwin_arch)} \ + %{!Zforce_cpusubtype_ALL: -arch_only %(darwin_subarch)} \ %{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \ %{Zinstall_name*:-install_name %*} \ %{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \ @@ -332,7 +332,8 @@ extern const char *darwin_fix_and_continue_switch; /* #define ENDFILE_SPEC "" */ /* Default Darwin ASM_SPEC, very simple. */ -#define ASM_SPEC "-arch %(darwin_arch)" +#define ASM_SPEC "-arch %(darwin_arch) \ + %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL}" /* We use Dbx symbol format. */ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index c7b583d14bf..d36b511819e 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -45,16 +45,13 @@ Boston, MA 02111-1307, USA. */ %{g: %{!gfull: -feliminate-unused-debug-symbols %