Module Name:    src
Committed By:   matt
Date:           Fri Jan 11 13:58:41 UTC 2013

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-elf.h

Log Message:
Add missing % to SUBTARGET_ASM_FLOAT_SPEC
If compiling for AAPCS, default to a TARGET_CPU_arm926ejs (armv5te)
If linking for AAPCS, use the right linker emulation.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/external/gpl3/gcc/dist/gcc/config/arm/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/arm/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.2 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.3
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.2	Sun Aug  5 04:10:18 2012
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h	Fri Jan 11 13:58:40 2013
@@ -24,6 +24,13 @@
 
 /* arm.h defaults to ARM6 CPU.  */
 
+/* Default EABI to armv5t so that thumb shared libraries work.
+   The ARM926EH-S core is the default for armv5te, so set
+   SUBTARGET_CPU_DEFAULT to achieve this.  */
+
+#define SUBTARGET_CPU_DEFAULT \
+	(TARGET_AAPCS_BASED ? TARGET_CPU_arm926ejs : TARGET_CPU_arm6)
+
 /* This defaults us to little-endian.  */
 #ifndef TARGET_ENDIAN_DEFAULT
 #define TARGET_ENDIAN_DEFAULT 0
@@ -58,8 +65,8 @@
 /* Default to full VFP if -mhard-float is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC
 #define SUBTARGET_ASM_FLOAT_SPEC	\
-  "%{mhard-float:{!mfpu=*:-mfpu=vfp}}   \
-   %{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
+  "%{mhard-float:%{!mfpu=*:-mfpu=vfp}}   \
+   %{mfloat-abi=hard:%{!mfpu=*:-mfpu=vfp}}"
 
 #undef SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS				\
@@ -72,7 +79,9 @@
 
 #undef LINK_SPEC
 #define LINK_SPEC \
-  "-X %{mbig-endian:-EB} %{mlittle-endian:-EL} \
+  "-X \
+   %{mbig-endian:-EB %{-mabi=aapcs*:-m armelfb_nbsd_eabi}} \
+   %{mlittle-endian:-EL %{-mabi=aapcs*:-m armelf_nbsd_eabi}} \
    %(netbsd_link_spec)"
 
 /* Make GCC agree with <machine/ansi.h>.  */

Reply via email to