summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2015-04-10 23:07:19 +0000
committerDerek Schuff <dschuff@google.com>2015-04-10 23:07:19 +0000
commita419e1ce6c3d4f8f42869f5efd252d98e2972b13 (patch)
tree179502889d2b6f67657b1c8bc9219d23c82eb7ad
parentdd50f7421cebbbdf6ba0a5116e40329d6522c9e6 (diff)
downloadbcm5719-llvm-a419e1ce6c3d4f8f42869f5efd252d98e2972b13.tar.gz
bcm5719-llvm-a419e1ce6c3d4f8f42869f5efd252d98e2972b13.zip
NaCl ARM: fix assembler float abi flags
Summary: tools::arm::getARMFloatABI() was falling back to guessing soft-float because it wasn't seeing the GNUEABIHF environment from ComputeEffectivClangTriple when it was called from gnutools::Assemble::ConstructJob. Fix by using the effective clang triple in gnutools::Assemble, which now matches the -triple flag used by cc1 and ClangAs jobs. Reviewers: jvoung Subscribers: rengolin, jfb, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D8902 llvm-svn: 234661
-rw-r--r--clang/lib/Driver/Tools.cpp3
-rw-r--r--clang/test/Driver/nacl-direct.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 9ebf681aabd..012e69b7dca 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -7414,7 +7414,8 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
}
StringRef ARMFloatABI = tools::arm::getARMFloatABI(
- getToolChain().getDriver(), Args, Triple);
+ getToolChain().getDriver(), Args,
+ llvm::Triple(getToolChain().ComputeEffectiveClangTriple(Args)));
CmdArgs.push_back(Args.MakeArgString("-mfloat-abi=" + ARMFloatABI));
Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
diff --git a/clang/test/Driver/nacl-direct.c b/clang/test/Driver/nacl-direct.c
index f5d34d36260..9768eab24dc 100644
--- a/clang/test/Driver/nacl-direct.c
+++ b/clang/test/Driver/nacl-direct.c
@@ -54,6 +54,7 @@
// CHECK-ARM: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}arm-nacl{{/|\\\\}}usr{{/|\\\\}}include"
// CHECK-ARM: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}arm-nacl{{/|\\\\}}include"
// CHECK-ARM: as{{(.exe)?}}"
+// CHECK-ARM: "-mfloat-abi=hard"
// CHECK-ARM: ld{{(.exe)?}}"
// CHECK-ARM: "--build-id"
// CHECK-ARM: "-m" "armelf_nacl"
@@ -71,6 +72,8 @@
// CHECK-ARM-NOV7: "-triple" "armv7--nacl-gnueabihf"
// CHECK-ARM-NOV7: "-target-abi" "aapcs-linux"
// CHECK-ARM-NOV7: "-mfloat-abi" "hard"
+// CHECK-ARM-NOV7: as{{(.exe)?}}"
+// CHECK-ARM-NOV7: "-mfloat-abi=hard"
// Test clang c++ include dirs and link line when using clang++
OpenPOWER on IntegriCloud