summaryrefslogtreecommitdiffstats
path: root/contrib/llvm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-17 18:53:36 +0000
committerian <ian@FreeBSD.org>2014-05-17 18:53:36 +0000
commit1253f26158ac37c8e2dbe8087203a2059aa2bb56 (patch)
tree55cacb7f7f4f144bb7eb2d4704b89fa045af7e35 /contrib/llvm
parent52cdf0b123c0f95c8994717d246d5a3de75058b2 (diff)
downloadFreeBSD-src-1253f26158ac37c8e2dbe8087203a2059aa2bb56.zip
FreeBSD-src-1253f26158ac37c8e2dbe8087203a2059aa2bb56.tar.gz
MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711,
Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the current rounding mode used by the VFP unit. Simplify how we build MACHINE_ARCH. There are 3 options that may be set however only arm, armeb, armv6, and soon armv6hf will be used. Add the llvm/clang patch for r263619. Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are identical this allows us to build for both v6 and v7 together. Add code for enabling second CPU core for A20 SoC. Enable SMP on Cubieboard2. Switch to freebsd.org emal address in copyright.
Diffstat (limited to 'contrib/llvm')
-rw-r--r--contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff81
1 files changed, 81 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff b/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff
new file mode 100644
index 0000000..d13648e
--- /dev/null
+++ b/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff
@@ -0,0 +1,81 @@
+Index: tools/clang/lib/Driver/ToolChains.cpp
+===================================================================
+--- tools/clang/lib/Driver/ToolChains.cpp
++++ tools/clang/lib/Driver/ToolChains.cpp
+@@ -2034,6 +2034,7 @@
+ bool FreeBSD::UseSjLjExceptions() const {
+ // FreeBSD uses SjLj exceptions on ARM oabi.
+ switch (getTriple().getEnvironment()) {
++ case llvm::Triple::GNUEABIHF:
+ case llvm::Triple::GNUEABI:
+ case llvm::Triple::EABI:
+ return false;
+Index: tools/clang/lib/Driver/Tools.cpp
+===================================================================
+--- tools/clang/lib/Driver/Tools.cpp
++++ tools/clang/lib/Driver/Tools.cpp
+@@ -737,8 +737,15 @@
+ }
+
+ case llvm::Triple::FreeBSD:
+- // FreeBSD defaults to soft float
+- FloatABI = "soft";
++ switch(Triple.getEnvironment()) {
++ case llvm::Triple::GNUEABIHF:
++ FloatABI = "hard";
++ break;
++ default:
++ // FreeBSD defaults to soft float
++ FloatABI = "soft";
++ break;
++ }
+ break;
+
+ default:
+@@ -5776,8 +5783,18 @@
+ }
+ } else if (getToolChain().getArch() == llvm::Triple::arm ||
+ getToolChain().getArch() == llvm::Triple::thumb) {
+- CmdArgs.push_back("-mfpu=softvfp");
++ const Driver &D = getToolChain().getDriver();
++ llvm::Triple Triple = getToolChain().getTriple();
++ StringRef FloatABI = getARMFloatABI(D, Args, Triple);
++
++ if (FloatABI == "hard") {
++ CmdArgs.push_back("-mfpu=vfp");
++ } else {
++ CmdArgs.push_back("-mfpu=softvfp");
++ }
++
+ switch(getToolChain().getTriple().getEnvironment()) {
++ case llvm::Triple::GNUEABIHF:
+ case llvm::Triple::GNUEABI:
+ case llvm::Triple::EABI:
+ CmdArgs.push_back("-meabi=5");
+Index: tools/clang/test/Driver/freebsd.c
+===================================================================
+--- tools/clang/test/Driver/freebsd.c
++++ tools/clang/test/Driver/freebsd.c
+@@ -101,13 +101,22 @@
+ // RUN: | FileCheck --check-prefix=CHECK-ARM %s
+ // CHECK-ARM: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
+ // CHECK-ARM: as{{.*}}" "-mfpu=softvfp"{{.*}}"-matpcs"
++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp"
+
+ // RUN: %clang %s -### -target arm-gnueabi-freebsd10.0 2>&1 \
+ // RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s
+ // CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
+ // CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5"
++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp"
+ // CHECK-ARM-EABI-NOT: as{{.*}}" "-matpcs"
+
++// RUN: %clang %s -### -o %t.o -target arm-gnueabihf-freebsd10.0 -no-integrated-as 2>&1 \
++// RUN: | FileCheck --check-prefix=CHECK-ARM-EABIHF %s
++// CHECK-ARM-EABIHF-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
++// CHECK-ARM-EABIHF: as{{.*}}" "-mfpu=vfp" "-meabi=5"
++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-mfpu=softvfp"
++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-matpcs"
++
+ // RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto -o %t.o 2>&1 \
+ // RUN: | FileCheck --check-prefix=CHECK-LTO %s
+ // CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.so
OpenPOWER on IntegriCloud