aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2014-03-23 12:49:25 +0000
committerAndrew Turner <andrew@FreeBSD.org>2014-03-23 12:49:25 +0000
commit73279d4113e80c00043c03c5d2e9d5632bb593a4 (patch)
tree1949e937eb5bec564ca9f702751244ed2c5927e7 /lib
parent4e3f1ce854e19a0daf7ea09504696abc83c5d1b7 (diff)
downloadsrc-73279d4113e80c00043c03c5d2e9d5632bb593a4.tar.gz
src-73279d4113e80c00043c03c5d2e9d5632bb593a4.zip
Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.
This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa.
Notes
Notes: svn path=/head/; revision=263660
Diffstat (limited to 'lib')
-rw-r--r--lib/clang/clang.build.mk6
-rw-r--r--lib/libc/Makefile3
-rw-r--r--lib/libc/arm/aeabi/Makefile.inc6
-rw-r--r--lib/libcompiler_rt/Makefile4
-rw-r--r--lib/libkvm/Makefile2
5 files changed, 14 insertions, 7 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index 599553987903..b58cd0cae6fa 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -23,12 +23,14 @@ BUILD_ARCH?= ${MACHINE_ARCH}
.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \
${MK_ARM_EABI} != "no"
TARGET_ABI= gnueabi
+.elif ${TARGET_ARCH} == "armv6hf"
+TARGET_ABI= gnueabihf
.else
TARGET_ABI= unknown
.endif
-TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
-BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd11.0
+TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0
+BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \
-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index da9354e8303f..34dac5255432 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -98,7 +98,8 @@ NOASM=
.include "${LIBC_SRCTOP}/rpc/Makefile.inc"
.include "${LIBC_SRCTOP}/uuid/Makefile.inc"
.include "${LIBC_SRCTOP}/xdr/Makefile.inc"
-.if ${LIBC_ARCH} == "arm" || ${LIBC_ARCH} == "mips"
+.if (${LIBC_ARCH} == "arm" && ${MACHINE_ARCH} != "armv6hf") ||\
+ ${LIBC_ARCH} == "mips"
.include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
.endif
.if ${MK_NIS} != "no"
diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc
index 46ca764decbe..8f9e19ec2df9 100644
--- a/lib/libc/arm/aeabi/Makefile.inc
+++ b/lib/libc/arm/aeabi/Makefile.inc
@@ -3,9 +3,11 @@
.PATH: ${LIBC_SRCTOP}/arm/aeabi
SRCS+= aeabi_atexit.c \
- aeabi_double.c \
- aeabi_float.c \
aeabi_unwind_cpp.c
+.if ${MACHINE_ARCH} != "armv6hf"
+SRCS+= aeabi_double.c \
+ aeabi_float.c
+.endif
.if ${MACHINE_ARCH:Marmv6*}
SRCS+= aeabi_vfp_double.S \
aeabi_vfp_float.S
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index 8c560d7b3681..5f8039bc166f 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -165,7 +165,9 @@ SRCF+= stdatomic
.endif
.for file in ${SRCF}
-. if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S)
+. if ${MACHINE_ARCH} == "armv6hf" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
+SRCS+= ${file}vfp.S
+. elif (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH} == "armv6hf") && exists(${CRTSRC}/${CRTARCH}/${file}.S)
SRCS+= ${file}.S
. else
SRCS+= ${file}.c
diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile
index a50f948a171a..4608254b497e 100644
--- a/lib/libkvm/Makefile
+++ b/lib/libkvm/Makefile
@@ -3,7 +3,7 @@
.if defined(TARGET_ARCH) && !defined(COMPAT_32BIT)
KVM_XARCH=${TARGET_ARCH}
-KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
+KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
.else
KVM_XARCH=${MACHINE_ARCH}
KVM_XCPUARCH=${MACHINE_CPUARCH}