diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2011-08-08 12:08:31 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2011-08-08 12:08:31 +0000 |
commit | e3b3fa45a4f948172b5a67c9b5c830e5519a6d24 (patch) | |
tree | 439a79b47394f0d2379508ef29b4d60d24bf72f2 /gcc/config/sparc | |
parent | ce6bfa50fa3131aea4b3506f2fd5fe0f5274840c (diff) | |
download | gcc-e3b3fa45a4f948172b5a67c9b5c830e5519a6d24.zip gcc-e3b3fa45a4f948172b5a67c9b5c830e5519a6d24.tar.gz gcc-e3b3fa45a4f948172b5a67c9b5c830e5519a6d24.tar.bz2 |
driver-sparc.c: New file.
gcc:
* config/sparc/driver-sparc.c: New file.
* config/sparc/x-sparc: New file.
* config.host: Use driver-sparc.o, sparc/x-sparc on
sparc*-*-solaris2*.
* config/sparc/sparc.opt (native): New value for enum
processor_type.
* config/sparc/sparc-opts.h (PROCESSOR_NATIVE): Declare.
* config/sparc/sparc.c (sparc_option_override): Abort if
PROCESSOR_NATIVE gets here.
* config/sparc/sol2.h [__sparc__] (host_detect_local_cpu): Declare.
(EXTRA_SPEC_FUNCTIONS, MCPU_MTUNE_NATIVE_SPECS,
DRIVER_SELF_SPECS): Define.
* doc/invoke.texi (SPARC Options, -mcpu): Document native.
(SPARC Options, -mtune): Likewise.
* configure.ac (EXTRA_GCC_LIBS): Check for libkstat.
Substitute result.
* configure: Regenerate.
* Makefile.in (EXTRA_GCC_LIBS): Set.
(xgcc$(exeext)): Add $(EXTRA_GCC_LIBS).
(cpp$(exeext)): Likewise.
gcc/cp:
* Make-lang.in (g++$(exeext)): Add $(EXTRA_GCC_LIBS).
gcc/fortran:
* Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
gcc/go:
* Make-lang.in (gccgo$(exeext)): Add $(EXTRA_GCC_LIBS).
gcc/java:
* Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
From-SVN: r177559
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sol2.h | 16 | ||||
-rw-r--r-- | gcc/config/sparc/sparc-opts.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.opt | 3 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index 64932f9..86afbbe 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -157,6 +157,22 @@ along with GCC; see the file COPYING3. If not see %{!m32:%{!m64:%(cpp_arch_default)}} \ " +/* -mcpu=native handling only makes sense with compiler running on + a SPARC chip. */ +#if defined(__sparc__) +extern const char *host_detect_local_cpu (int argc, const char **argv); +# define EXTRA_SPEC_FUNCTIONS \ + { "local_cpu_detect", host_detect_local_cpu }, + +# define MCPU_MTUNE_NATIVE_SPECS \ + " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \ + " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}" +#else +# define MCPU_MTUNE_NATIVE_SPECS "" +#endif + +#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS + #undef CC1_SPEC #if DEFAULT_ARCH32_P #define CC1_SPEC "\ diff --git a/gcc/config/sparc/sparc-opts.h b/gcc/config/sparc/sparc-opts.h index d925ed3..aef69b4 100644 --- a/gcc/config/sparc/sparc-opts.h +++ b/gcc/config/sparc/sparc-opts.h @@ -41,7 +41,8 @@ enum processor_type { PROCESSOR_ULTRASPARC, PROCESSOR_ULTRASPARC3, PROCESSOR_NIAGARA, - PROCESSOR_NIAGARA2 + PROCESSOR_NIAGARA2, + PROCESSOR_NATIVE }; #endif diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 8116844..d4c64d0 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -911,6 +911,8 @@ sparc_option_override (void) case PROCESSOR_NIAGARA2: sparc_costs = &niagara2_costs; break; + case PROCESSOR_NATIVE: + gcc_unreachable (); }; #ifdef TARGET_DEFAULT_LONG_DOUBLE_128 diff --git a/gcc/config/sparc/sparc.opt b/gcc/config/sparc/sparc.opt index d729214..84bf288 100644 --- a/gcc/config/sparc/sparc.opt +++ b/gcc/config/sparc/sparc.opt @@ -101,6 +101,9 @@ Enum Name(sparc_processor_type) Type(enum processor_type) EnumValue +Enum(sparc_processor_type) String(native) Value(PROCESSOR_NATIVE) DriverOnly + +EnumValue Enum(sparc_processor_type) String(v7) Value(PROCESSOR_V7) EnumValue |