Commit 0913b2d6 by David S. Miller Committed by David S. Miller

config.host: Add driver-sparc.o and sparc/x-sparc on native sparc*-*-linux* builds.

	* config.host: Add driver-sparc.o and sparc/x-sparc on
	native sparc*-*-linux* builds.
	* config/sparc/driver-sparc.c: Correct Linux strings.
	* config/sparc/linux.h: Add DRIVER_SELF_SPECS.
	* config/sparc/linux64.h: Likewise.
	* doc/invoke.texi: Document that Linux also supports
	-mcpu=native and -mtune=native on sparc.

From-SVN: r178553
parent e42bcfa3
2011-09-05 David S. Miller <davem@davemloft.net>
* config.host: Add driver-sparc.o and sparc/x-sparc on
native sparc*-*-linux* builds.
* config/sparc/driver-sparc.c: Correct Linux strings.
* config/sparc/linux.h: Add DRIVER_SELF_SPECS.
* config/sparc/linux64.h: Likewise.
* doc/invoke.texi: Document that Linux also supports
-mcpu=native and -mtune=native on sparc.
2011-09-05 Georg-Johann Lay <avr@gjlay.de> 2011-09-05 Georg-Johann Lay <avr@gjlay.de>
PR target/50289 PR target/50289
...@@ -14,7 +24,7 @@ ...@@ -14,7 +24,7 @@
calculations. calculations.
2011-09-05 Georg-Johann Lay <avr@gjlay.de> 2011-09-05 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.h (progmem_section): Remove Declaration. * config/avr/avr.h (progmem_section): Remove Declaration.
* config/avr/avr.c (progmem_section): Make static and rename to * config/avr/avr.c (progmem_section): Make static and rename to
progmem_swtable_section. progmem_swtable_section.
...@@ -165,6 +165,14 @@ case ${host} in ...@@ -165,6 +165,14 @@ case ${host} in
;; ;;
esac esac
;; ;;
sparc*-*-linux*)
case ${target} in
sparc*-*-linux*)
host_extra_gcc_objs="driver-sparc.o"
host_xmake_file="${host_xmake_file} sparc/x-sparc"
;;
esac
;;
esac esac
# Machine-specific settings. # Machine-specific settings.
......
...@@ -58,7 +58,21 @@ static const struct cpu_names { ...@@ -58,7 +58,21 @@ static const struct cpu_names {
{ "SPARC-T3", "niagara2" }, { "SPARC-T3", "niagara2" },
{ "SPARC-T4", "niagara2" }, { "SPARC-T4", "niagara2" },
#else #else
/* FIXME: Provide Linux/SPARC values. */ { "SuperSPARC", "supersparc" },
{ "HyperSparc", "hypersparc" },
{ "SpitFire", "ultrasparc" },
{ "BlackBird", "ultrasparc" },
{ "Sabre", "ultrasparc" },
{ "Hummingbird", "ultrasparc" },
{ "Cheetah", "ultrasparc3" },
{ "Jalapeno", "ultrasparc3" },
{ "Jaguar", "ultrasparc3" },
{ "Panther", "ultrasparc3" },
{ "Serrano", "ultrasparc3" },
{ "UltraSparc T1", "niagara" },
{ "UltraSparc T2", "niagara2" },
{ "UltraSparc T3", "niagara2" },
{ "UltraSparc T4", "niagara2" },
#endif #endif
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -137,7 +151,7 @@ host_detect_local_cpu (int argc, const char **argv) ...@@ -137,7 +151,7 @@ host_detect_local_cpu (int argc, const char **argv)
return NULL; return NULL;
while (fgets (buf, sizeof (buf), f) != NULL) while (fgets (buf, sizeof (buf), f) != NULL)
if (strncmp (buf, "cpu model", sizeof ("cpu model") - 1) == 0) if (strncmp (buf, "cpu\t\t:", sizeof ("cpu\t\t:") - 1) == 0)
{ {
for (i = 0; cpu_names [i].name; i++) for (i = 0; cpu_names [i].name; i++)
if (strstr (buf, cpu_names [i].name) != NULL) if (strstr (buf, cpu_names [i].name) != NULL)
......
...@@ -39,6 +39,22 @@ along with GCC; see the file COPYING3. If not see ...@@ -39,6 +39,22 @@ along with GCC; see the file COPYING3. If not see
"%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" %{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
/* -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
/* This is for -profile to use -lc_p instead of -lc. */ /* This is for -profile to use -lc_p instead of -lc. */
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "%{profile:-p} \ #define CC1_SPEC "%{profile:-p} \
......
...@@ -142,6 +142,22 @@ along with GCC; see the file COPYING3. If not see ...@@ -142,6 +142,22 @@ along with GCC; see the file COPYING3. If not see
%{!mno-relax:%{!r:-relax}} \ %{!mno-relax:%{!r:-relax}} \
" "
/* -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 #undef CC1_SPEC
#if DEFAULT_ARCH32_P #if DEFAULT_ARCH32_P
#define CC1_SPEC "%{profile:-p} \ #define CC1_SPEC "%{profile:-p} \
......
...@@ -17285,7 +17285,7 @@ for machine type @var{cpu_type}. Supported values for @var{cpu_type} are ...@@ -17285,7 +17285,7 @@ for machine type @var{cpu_type}. Supported values for @var{cpu_type} are
@samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc},
@samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}. @samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}.
Native Solaris toolchains also support the value @samp{native}, Native Solaris and Linux toolchains also support the value @samp{native},
which selects the best architecture option for the host processor. which selects the best architecture option for the host processor.
@option{-mcpu=native} has no effect if GCC does not recognize @option{-mcpu=native} has no effect if GCC does not recognize
the processor. the processor.
...@@ -17354,8 +17354,8 @@ The same values for @option{-mcpu=@var{cpu_type}} can be used for ...@@ -17354,8 +17354,8 @@ The same values for @option{-mcpu=@var{cpu_type}} can be used for
that select a particular CPU implementation. Those are @samp{cypress}, that select a particular CPU implementation. Those are @samp{cypress},
@samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{f930}, @samp{f934}, @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{f930}, @samp{f934},
@samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, @samp{ultrasparc3}, @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, @samp{ultrasparc3},
@samp{niagara}, and @samp{niagara2}. With native Solaris toolchains, @samp{niagara}, and @samp{niagara2}. With native Solaris and Linux
@samp{native} can also be used. toolchains, @samp{native} can also be used.
@item -mv8plus @item -mv8plus
@itemx -mno-v8plus @itemx -mno-v8plus
......
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