2016-08-19 00:25:57 +02:00
|
|
|
diff -u -r ../llvm-3.8.1.src/tools/clang/lib/Driver/Tools.cpp ./tools/clang/lib/Driver/Tools.cpp
|
|
|
|
--- ../llvm-3.8.1.src/tools/clang/lib/Driver/Tools.cpp 2016-02-12 17:51:41.000000000 -0500
|
|
|
|
+++ ./tools/clang/lib/Driver/Tools.cpp 2016-08-18 10:00:30.287138752 -0400
|
2016-05-02 20:46:39 +02:00
|
|
|
@@ -733,11 +733,11 @@
|
|
|
|
ABI = FloatABI::SoftFP;
|
|
|
|
break;
|
|
|
|
case llvm::Triple::Android:
|
|
|
|
- ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft;
|
2016-05-19 00:50:47 +02:00
|
|
|
+ ABI = FloatABI::SoftFP;
|
2016-05-02 20:46:39 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// Assume "soft", but warn the user we are guessing.
|
|
|
|
- ABI = FloatABI::Soft;
|
2016-05-19 00:50:47 +02:00
|
|
|
+ ABI = FloatABI::SoftFP;
|
2016-05-02 20:46:39 +02:00
|
|
|
if (Triple.getOS() != llvm::Triple::UnknownOS ||
|
|
|
|
!Triple.isOSBinFormatMachO())
|
|
|
|
D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "soft";
|
2016-08-19 00:25:57 +02:00
|
|
|
@@ -8773,9 +8773,18 @@
|
|
|
|
|
|
|
|
const llvm::Triple::ArchType Arch = ToolChain.getArch();
|
|
|
|
const bool isAndroid = ToolChain.getTriple().isAndroid();
|
|
|
|
const bool IsPIE =
|
|
|
|
!Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) &&
|
|
|
|
- (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
|
|
|
|
+ (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()
|
|
|
|
+ /* Termux modification: Revert
|
|
|
|
+ http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150302/124624.html
|
|
|
|
+ as we really want pie by default: */
|
|
|
|
+ // On Android every code is PIC so every executable is PIE
|
|
|
|
+ // Cannot use isPIEDefault here since otherwise
|
|
|
|
+ // PIE only logic will be enabled during compilation
|
|
|
|
+ || isAndroid)
|
|
|
|
+ && !Args.hasArg(options::OPT_nopie);
|
|
|
|
+
|
|
|
|
const bool HasCRTBeginEndFiles =
|
|
|
|
ToolChain.getTriple().hasEnvironment() ||
|
|
|
|
(ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies);
|