Module Name: src
Committed By: mrg
Date: Mon Jul 11 08:23:48 UTC 2011
Modified Files:
src/external/gpl3/gcc/dist/gcc/config/m68k: netbsd-elf.h
Log Message:
make this look more like the (working) gcc 4.1 configuration, and make
this actually work on netbsd/sun2.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.3 src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.4
--- src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.3 Sun Jul 3 09:10:42 2011
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h Mon Jul 11 08:23:48 2011
@@ -46,21 +46,41 @@
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80
#endif
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
+ { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \
+ { "cpp_cpu_spec", CPP_CPU_SPEC }, \
+ { "cpp_fpu_spec", CPP_FPU_SPEC }, \
+ { "asm_default_spec", ASM_DEFAULT_SPEC }, \
+ { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \
{ "netbsd_entry_point", NETBSD_ENTRY_POINT },
+#define CPP_CPU_SPEC \
+ "%{m68010:-D__mc68010__} \
+ %{m68020:-D__mc68020__} \
+ %{m68030:-D__mc68030__} \
+ %{m68040:-D__mc68040__} \
+ %(cpp_cpu_default_spec)"
+
+
#undef TARGET_VERSION
-#if 0
-#define TARGET_VERSION \
- fprintf (stderr, \
- TARGET_68010 \
- ? " (NetBSD/68010 ELF)" \
- : " (NetBSD/m68k ELF)");
+#if TARGET_DEFAULT & MASK_68020
+#define TARGET_VERSION fprintf (stderr, " (NetBSD/m68k ELF)");
+#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68020__}"
+#define ASM_DEFAULT_SPEC "%{!m680*:-m68020}"
+#else
+#define TARGET_VERSION fprintf (stderr, " (NetBSD/68010 ELF)");
+#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68010__}"
+#define ASM_DEFAULT_SPEC "%{!m680*:-m68010}"
+#endif
+
+
+#if TARGET_DEFAULT & MASK_68881
+#define CPP_FPU_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__}"
#else
-#define TARGET_VERSION \
- fprintf (stderr," (NetBSD/m68k/68010 ELF)");
+#define CPP_FPU_SPEC "%{m68881:-D__HAVE_68881__ -D__HAVE_FPU__}"
#endif
@@ -69,14 +89,18 @@
whether or not use of the FPU is allowed. */
#undef CPP_SPEC
-#define CPP_SPEC NETBSD_CPP_SPEC
+#define CPP_SPEC \
+ "%(netbsd_cpp_spec) %(cpp_cpu_spec) %(cpp_fpu_spec)"
/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We need
to pass PIC code generation options. */
#undef ASM_SPEC
-#define ASM_SPEC "%(asm_cpu_spec) %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}"
+#define ASM_SPEC \
+ "%(asm_default_spec) \
+ %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
+ %{fpic|fpie:-k} %{fPIC|fPIE:-k -K}"
#define AS_NEEDS_DASH_FOR_PIPED_INPUT