diff options
| author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-08 13:05:50 +0200 |
|---|---|---|
| committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-10 15:59:16 +0200 |
| commit | ac8bf73dbf325ffaf2f0acff676a18f87fea5311 (patch) | |
| tree | 46d58b7129e88c2326c8e4e04db352413fb0b857 | |
| parent | 49ab7865c76328231fe862a5b44f18418c9222f0 (diff) | |
| download | clang-ac8bf73dbf325ffaf2f0acff676a18f87fea5311.tar.gz clang-ac8bf73dbf325ffaf2f0acff676a18f87fea5311.tar.bz2 clang-ac8bf73dbf325ffaf2f0acff676a18f87fea5311.tar.xz | |
[Embtk]: MIPS: when there is no -mfloat-abi=, default to the one used at configure time if any
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
(cherry picked from commit cc803990a10d716011ac47300c8c90aae19dcc88)
| -rw-r--r-- | lib/Driver/Tools.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 2a8c32fd5a..0a8b44d153 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -946,6 +946,13 @@ static StringRef getMipsFloatABI(const Driver &D, const ArgList &Args) { } } + // If a default float ABI was configured and FloatABI is empty, use it + if (llvm::sys::hasDefaultTargetFloat() && FloatABI.empty()) { + StringRef DefaultFloatABI = llvm::sys::getDefaultTargetFloat(); + if (DefaultFloatABI == "hard" || DefaultFloatABI == "soft") + return DefaultFloatABI; + } + // If unspecified, choose the default based on the platform. if (FloatABI.empty()) { // Assume "hard", because it's a default value used by gcc. |
