Commit 0c004537 by Richard Sandiford Committed by Richard Sandiford

200x-xx-xx Richard Sandiford <richard@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com>

gcc/
200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>

	* config/m68k/m68k.h (ASM_CPU_SPEC, ASM_SPEC, EXTRA_SPECS)
	(SUBTARGET_EXTRA_SPECS): New macros.
	* config/m68k/linux.h (ASM_SPEC): Remove CPU flags;
	use %(asm_cpu_spec) instead.
	* config/m68k/m68k-none.h (ASM_SPEC): Likewise.
	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
	(EXTRA_SPECS): Rename to...
	(SUBTARGET_EXTRA_SPECS): ...this.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>

From-SVN: r120712
parent 59fbf3cb
2007-01-12 Richard Sandiford <richard@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* config/m68k/m68k.h (ASM_CPU_SPEC, ASM_SPEC, EXTRA_SPECS)
(SUBTARGET_EXTRA_SPECS): New macros.
* config/m68k/linux.h (ASM_SPEC): Remove CPU flags;
use %(asm_cpu_spec) instead.
* config/m68k/m68k-none.h (ASM_SPEC): Likewise.
* config/m68k/openbsd.h (ASM_SPEC): Likewise.
* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
(EXTRA_SPECS): Rename to...
(SUBTARGET_EXTRA_SPECS): ...this.
2007-01-12 Nathan Sidwell <nathan@codesourcery.com> 2007-01-12 Nathan Sidwell <nathan@codesourcery.com>
Richard Sandiford <richard@codesourcery.com> Richard Sandiford <richard@codesourcery.com>
Julian Brown <julian@codesourcery.com> Julian Brown <julian@codesourcery.com>
......
...@@ -23,6 +23,11 @@ Boston, MA 02110-1301, USA. */ ...@@ -23,6 +23,11 @@ Boston, MA 02110-1301, USA. */
#undef TARGET_VERSION #undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (68k GNU/Linux with ELF)"); #define TARGET_VERSION fprintf (stderr, " (68k GNU/Linux with ELF)");
/* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC. */
#undef ASM_SPEC
#define ASM_SPEC \
"%(asm_cpu_spec) %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}"
/* for 68k machines this only needs to be TRUE for the 68000 */ /* for 68k machines this only needs to be TRUE for the 68000 */
#undef STRICT_ALIGNMENT #undef STRICT_ALIGNMENT
...@@ -85,13 +90,6 @@ Boston, MA 02110-1301, USA. */ ...@@ -85,13 +90,6 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
/* We override the ASM_SPEC from svr4.h because we must pass -m68040 down
to the assembler. */
#undef ASM_SPEC
#define ASM_SPEC \
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
%{m68040} %{m68060:-m68040}"
/* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate link things in one of these three modes by applying the appropriate
......
...@@ -18,13 +18,9 @@ along with GCC; see the file COPYING. If not, write to ...@@ -18,13 +18,9 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor, the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */ Boston, MA 02110-1301, USA. */
/* Pass flags to gas indicating which type of processor we have. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "\ #define ASM_SPEC "%(asm_cpu_spec) %{fPIC:--pcrel} %{fpic:--pcrel} \
%{m68851}%{mno-68851}%{m68881}%{mno-68881}%{msoft-float:-mno-68881} %{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}%{m68040}%{m68020-40:-mc68040} %{m68020-60:-mc68040} %{m68060}%{mcpu32}%{m68332}%{m5200}%{m5206e}%{m528x}%{m5307}%{m5407}%{mcfv4e} \ %{msep-data:--pcrel} %{mid-shared-library:--pcrel}"
%{fPIC:--pcrel} %{fpic:--pcrel} %{msep-data:--pcrel} %{mid-shared-library:--pcrel} \
"
/* cc1/cc1plus always receives all the -m flags. If the specs strings above /* cc1/cc1plus always receives all the -m flags. If the specs strings above
are consistent with the flags in m68k.opt, there should be no need for are consistent with the flags in m68k.opt, there should be no need for
......
...@@ -39,6 +39,25 @@ Boston, MA 02110-1301, USA. */ ...@@ -39,6 +39,25 @@ Boston, MA 02110-1301, USA. */
%{!m68332:%{!m5200:%{!m5206e:%{!m528x:%{!m5307:%{!m5407:%{!mcfv4e:\ %{!m68332:%{!m5200:%{!m5206e:%{!m528x:%{!m5307:%{!m5407:%{!mcfv4e:\
-%(VALUE)}}}}}}}}}}}}}}}}}}}" }, -%(VALUE)}}}}}}}}}}}}}}}}}}}" },
/* Pass flags to gas indicating which type of processor we have. This
can be simplified when we can rely on the assembler supporting .cpu
and .arch directives. */
#define ASM_CPU_SPEC "\
%{m68851}%{mno-68851} %{m68881}%{mno-68881} %{msoft-float:-mno-float} \
%{m68000}%{m68302}%{mc68000}%{m68010}%{m68020}%{mc68020}%{m68030}\
%{m68040}%{m68020-40:-m68040}%{m68020-60:-m68040}\
%{m68060}%{mcpu32}%{m68332}%{m5200}%{m5206e}%{m528x}%{m5307}%{m5407}%{mcfv4e}\
"
#define ASM_SPEC "%(asm_cpu_spec)"
#define EXTRA_SPECS \
{ "asm_cpu_spec", ASM_CPU_SPEC }, \
SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS
/* Note that some other tm.h files include this one and then override /* Note that some other tm.h files include this one and then override
many of the definitions that relate to assembler syntax. */ many of the definitions that relate to assembler syntax. */
......
...@@ -46,7 +46,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -46,7 +46,8 @@ Boston, MA 02110-1301, USA. */
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80
#endif #endif
#define EXTRA_SPECS \ #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "netbsd_entry_point", NETBSD_ENTRY_POINT }, { "netbsd_entry_point", NETBSD_ENTRY_POINT },
...@@ -66,13 +67,11 @@ Boston, MA 02110-1301, USA. */ ...@@ -66,13 +67,11 @@ Boston, MA 02110-1301, USA. */
#define CPP_SPEC NETBSD_CPP_SPEC #define CPP_SPEC NETBSD_CPP_SPEC
/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass /* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We need
on some CPU options, as well as PIC code generation options. */ to passn PIC code generation options. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC \ #define ASM_SPEC "%(asm_cpu_spec) %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}"
"%{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
%{fpic|fpie:-k} %{fPIC|fPIE:-k -K}"
#define AS_NEEDS_DASH_FOR_PIPED_INPUT #define AS_NEEDS_DASH_FOR_PIPED_INPUT
......
...@@ -34,9 +34,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -34,9 +34,8 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
/* m68k as needs to know about the processor subtype. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "%{m68030} %{m68040} %{m68060} %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}" #define ASM_SPEC "%(asm_cpu_spec) %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}"
#define AS_NEEDS_DASH_FOR_PIPED_INPUT #define AS_NEEDS_DASH_FOR_PIPED_INPUT
......
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