summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2012-08-15 03:21:56 +0000
committergonzo <gonzo@FreeBSD.org>2012-08-15 03:21:56 +0000
commitb501ab9dc953c1526e2383baf8e4a5c4165d7c7e (patch)
treed932e4ed6baded4e0705e97bb5e3d07841b77019 /contrib/gcc
parent0c19fd41e201fbcbf4ce5cb949c595c01a9ad102 (diff)
downloadFreeBSD-src-b501ab9dc953c1526e2383baf8e4a5c4165d7c7e.zip
FreeBSD-src-b501ab9dc953c1526e2383baf8e4a5c4165d7c7e.tar.gz
Merging of projects/armv6, part 3
r238211: Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb This adds a new TARGET_ARCH for building on ARM processors that support the ARMv6K multiprocessor extensions. In particular, these processors have better support for TLS and mutex operations. This mostly touches a lot of Makefiles to extend existing patterns for inferring CPUARCH from ARCH. It also configures: * GCC to default to arm1176jz-s * GCC to predefine __FreeBSD_ARCH_armv6__ * gas to default to ARM_ARCH_V6K * uname -p to return 'armv6' * make so that MACHINE_ARCH defaults to 'armv6' It also changes a number of headers to use the compiler __ARM_ARCH_XXX__ macros to configure processor-specific support routines. Submitted by: Tim Kientzle <kientzle@freebsd.org>
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/config/arm/freebsd.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/contrib/gcc/config/arm/freebsd.h b/contrib/gcc/config/arm/freebsd.h
index 577d6de..da7ffab 100644
--- a/contrib/gcc/config/arm/freebsd.h
+++ b/contrib/gcc/config/arm/freebsd.h
@@ -56,8 +56,6 @@
/************************[ Target stuff ]***********************************/
-#undef TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)");
#ifndef TARGET_ENDIAN_DEFAULT
#define TARGET_ENDIAN_DEFAULT 0
@@ -87,8 +85,22 @@
/* We use the GCC defaults here. */
#undef WCHAR_TYPE
+#if defined(FREEBSD_ARCH_armv6)
+#undef SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs
+#undef FBSD_TARGET_CPU_CPP_BUILTINS
+#define FBSD_TARGET_CPU_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__FreeBSD_ARCH_armv6__"); \
+ } while (0)
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (FreeBSD/armv6 ELF)");
+#else
#undef SUBTARGET_CPU_DEFAULT
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)");
+#endif
/* FreeBSD does its profiling differently to the Acorn compiler. We
don't need a word following the mcount call; and to skip it
OpenPOWER on IntegriCloud