aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2007-01-12 09:29:14 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-01-12 09:29:14 +0000
commit0c004537ffbedafce28ca062dbcb5951aaa7c289 (patch)
treedc14beaf3d6a4b96c29b8cb62f3cf7eee3c9296b /gcc
parent59fbf3cbc75f1c1bdc1cb643ea327934f0421f6e (diff)
downloadgcc-0c004537ffbedafce28ca062dbcb5951aaa7c289.zip
gcc-0c004537ffbedafce28ca062dbcb5951aaa7c289.tar.gz
gcc-0c004537ffbedafce28ca062dbcb5951aaa7c289.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/m68k/linux.h12
-rw-r--r--gcc/config/m68k/m68k-none.h8
-rw-r--r--gcc/config/m68k/m68k.h19
-rw-r--r--gcc/config/m68k/netbsd-elf.h11
-rw-r--r--gcc/config/m68k/openbsd.h3
6 files changed, 45 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e1167f1..e7ea8d5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+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>
Richard Sandiford <richard@codesourcery.com>
Julian Brown <julian@codesourcery.com>
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index eacc7fe..b1f9e97 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -23,6 +23,11 @@ Boston, MA 02110-1301, USA. */
#undef TARGET_VERSION
#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 */
#undef STRICT_ALIGNMENT
@@ -85,13 +90,6 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SPEC
#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
for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate
diff --git a/gcc/config/m68k/m68k-none.h b/gcc/config/m68k/m68k-none.h
index b30fb94..6b30389 100644
--- a/gcc/config/m68k/m68k-none.h
+++ b/gcc/config/m68k/m68k-none.h
@@ -18,13 +18,9 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* Pass flags to gas indicating which type of processor we have. */
-
#undef ASM_SPEC
-#define ASM_SPEC "\
-%{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} \
-%{fPIC:--pcrel} %{fpic:--pcrel} %{msep-data:--pcrel} %{mid-shared-library:--pcrel} \
-"
+#define ASM_SPEC "%(asm_cpu_spec) %{fPIC:--pcrel} %{fpic:--pcrel} \
+ %{msep-data:--pcrel} %{mid-shared-library:--pcrel}"
/* 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
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 5b017e4..de8e27c 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -39,6 +39,25 @@ Boston, MA 02110-1301, USA. */
%{!m68332:%{!m5200:%{!m5206e:%{!m528x:%{!m5307:%{!m5407:%{!mcfv4e:\
-%(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
many of the definitions that relate to assembler syntax. */
diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h
index 73673fd..c8dd1b9 100644
--- a/gcc/config/m68k/netbsd-elf.h
+++ b/gcc/config/m68k/netbsd-elf.h
@@ -46,7 +46,8 @@ Boston, MA 02110-1301, USA. */
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80
#endif
-#define EXTRA_SPECS \
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
{ "netbsd_entry_point", NETBSD_ENTRY_POINT },
@@ -66,13 +67,11 @@ Boston, MA 02110-1301, USA. */
#define CPP_SPEC NETBSD_CPP_SPEC
-/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass
- on some CPU options, as well as PIC code generation options. */
+/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We need
+ to passn PIC code generation options. */
#undef ASM_SPEC
-#define ASM_SPEC \
- "%{m68010} %{m68020} %{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
diff --git a/gcc/config/m68k/openbsd.h b/gcc/config/m68k/openbsd.h
index 20cdc6f..2bc0af5 100644
--- a/gcc/config/m68k/openbsd.h
+++ b/gcc/config/m68k/openbsd.h
@@ -34,9 +34,8 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SPEC
#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
-#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