its-pointless
6 years ago
committed by
Fredrik Fornwall
6 changed files with 50 additions and 62 deletions
@ -1,11 +1,40 @@ |
|||
--- ../cache/cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp 2017-12-11 18:14:51.000000000 +0000
|
|||
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2018-03-13 03:32:36.142985756 +0000
|
|||
@@ -816,7 +816,7 @@
|
|||
--- ./tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2019-02-16 23:00:22.943658132 +0000
|
|||
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-02-16 23:15:04.826482282 +0000
|
|||
@@ -652,8 +652,27 @@
|
|||
return; |
|||
|
|||
if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) |
|||
+ if (getTriple().isAndroid()) {
|
|||
+ switch (getTriple().getArch()) {
|
|||
+ case llvm::Triple::x86_64:
|
|||
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/x86_64-linux-android");
|
|||
+ break;
|
|||
+ case llvm::Triple::x86:
|
|||
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/i686-linux-android");
|
|||
+ break;
|
|||
+ case llvm::Triple::aarch64:
|
|||
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/aarch64-linux-android");
|
|||
+ break;
|
|||
+ case llvm::Triple::arm:
|
|||
+ case llvm::Triple::thumb:
|
|||
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/arm-linux-androideabi");
|
|||
+ break;
|
|||
+ default:
|
|||
+ break;
|
|||
+ }
|
|||
+
|
|||
addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/local/include"); |
|||
-
|
|||
+ }
|
|||
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { |
|||
SmallString<128> P(D.ResourceDir); |
|||
llvm::sys::path::append(P, "include"); |
|||
@@ -968,7 +987,7 @@
|
|||
} |
|||
|
|||
bool Linux::isPIEDefault() const { |
|||
- return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) ||
|
|||
+ return getTriple().isAndroid() ||
|
|||
+ return getTriple().isAndroid() ||
|
|||
getTriple().isMusl() || getSanitizerArgs().requiresPIE(); |
|||
} |
|||
|
|||
|
@ -1,22 +0,0 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html |
|||
TERMUX_PKG_DESCRIPTION="Header files from the Android NDK needed for compiling C++ programs using STL" |
|||
TERMUX_PKG_LICENSE="NCSA" |
|||
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_NO_DEVELSPLIT=yes |
|||
|
|||
termux_step_extract_into_massagedir() { |
|||
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ |
|||
cp -Rf $TERMUX_STANDALONE_TOOLCHAIN/include/c++/4.9.x/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ |
|||
|
|||
( cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ && patch -p1 < $TERMUX_PKG_BUILDER_DIR/math-header.diff ) |
|||
|
|||
# Revert the patch for <cstddef> that's only used for using g++ |
|||
# from the ndk (https://github.com/android-ndk/ndk/issues/215): |
|||
cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ |
|||
sed "s%\@TERMUX_HOST_PLATFORM\@%${TERMUX_HOST_PLATFORM}%g" $TERMUX_SCRIPTDIR/ndk-patches/cstddef.cpppatch | patch -p1 -R |
|||
} |
|||
|
|||
termux_step_massage() { |
|||
echo "overriding termux_step_massage to avoid removing header files" |
|||
} |
@ -1,24 +0,0 @@ |
|||
diff -u -r ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/cmath ./cmath
|
|||
--- ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/cmath 2018-01-03 00:47:31.973545021 +0100
|
|||
+++ ./cmath 2018-01-03 00:48:02.453189261 +0100
|
|||
@@ -302,7 +302,7 @@
|
|||
*/ |
|||
|
|||
#include <__config> |
|||
-#include <math.h>
|
|||
+#include <c++/v1/math.h>
|
|||
|
|||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
|||
#pragma GCC system_header |
|||
diff -u -r ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/math.h ./math.h
|
|||
--- ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/math.h 2018-01-03 00:47:31.985544880 +0100
|
|||
+++ ./math.h 2018-01-03 00:48:24.732929153 +0100
|
|||
@@ -298,7 +298,7 @@
|
|||
#pragma GCC system_header |
|||
#endif |
|||
|
|||
-#include_next <math.h>
|
|||
+#include <../../math.h>
|
|||
|
|||
#ifdef __cplusplus |
|||
|
Loading…
Reference in new issue