summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-01-17 05:56:28 +0000
committerandrew <andrew@FreeBSD.org>2013-01-17 05:56:28 +0000
commit9b858bb6f0adb73473a948583965d4fc128312c8 (patch)
tree24606f697ac98c0b9dab3e26889f40567aa563e5 /contrib/gcc
parent9d3b6799014eb32e9bd3bb2e40cc8d39a0cc2968 (diff)
downloadFreeBSD-src-9b858bb6f0adb73473a948583965d4fc128312c8.zip
FreeBSD-src-9b858bb6f0adb73473a948583965d4fc128312c8.tar.gz
Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting WITH_ARM_EABI when building, however only the kernel-toolchain target will work with this flag until the rest of the support is added.
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/config/arm/freebsd.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/contrib/gcc/config/arm/freebsd.h b/contrib/gcc/config/arm/freebsd.h
index 0f7f38a..04be692 100644
--- a/contrib/gcc/config/arm/freebsd.h
+++ b/contrib/gcc/config/arm/freebsd.h
@@ -29,8 +29,13 @@
{ "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
#undef SUBTARGET_EXTRA_ASM_SPEC
+#ifdef TARGET_ARM_EABI
+#define SUBTARGET_EXTRA_ASM_SPEC \
+ "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+#else
#define SUBTARGET_EXTRA_ASM_SPEC \
"-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+#endif
/* Default to full FPA if -mhard-float is specified. */
#undef SUBTARGET_ASM_FLOAT_SPEC
@@ -61,8 +66,25 @@
#define TARGET_ENDIAN_DEFAULT 0
#endif
+#ifdef TARGET_ARM_EABI
+/* We default to a soft-float ABI so that binaries can run on all
+ target hardware. */
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+
+#undef ARM_DEFAULT_ABI
+#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ FBSD_TARGET_OS_CPP_BUILTINS(); \
+ TARGET_BPABI_CPP_BUILTINS(); \
+ } \
+ while (false)
+#else
/* Default it to use ATPCS with soft-VFP. */
-#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
(MASK_APCS_FRAME \
| TARGET_ENDIAN_DEFAULT)
@@ -70,6 +92,10 @@
#undef ARM_DEFAULT_ABI
#define ARM_DEFAULT_ABI ARM_ABI_ATPCS
+#undef FPUTYPE_DEFAULT
+#define FPUTYPE_DEFAULT FPUTYPE_VFP
+#endif
+
/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c,
c-common.c, and config/<arch>/<arch>.h. */
@@ -134,5 +160,3 @@ do \
} \
while (0)
-#undef FPUTYPE_DEFAULT
-#define FPUTYPE_DEFAULT FPUTYPE_VFP
OpenPOWER on IntegriCloud