summaryrefslogtreecommitdiff
path: root/user/clang
diff options
context:
space:
mode:
Diffstat (limited to 'user/clang')
-rw-r--r--user/clang/APKBUILD6
-rw-r--r--user/clang/secure-plt.patch81
2 files changed, 14 insertions, 73 deletions
diff --git a/user/clang/APKBUILD b/user/clang/APKBUILD
index 331c96f56..10253a697 100644
--- a/user/clang/APKBUILD
+++ b/user/clang/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=clang
# Note: Update together with llvm.
-pkgver=6.0.1
+pkgver=7.0.1
pkgrel=0
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
@@ -103,8 +103,8 @@ analyzer() {
mv usr/share/scan-* "$subpkgdir"/usr/share/
}
-sha512sums="f64ba9290059f6e36fee41c8f32bf483609d31c291fcd2f77d41fecfdf3c8233a5e23b93a1c73fed03683823bd6e72757ed993dd32527de3d5f2b7a64bb031b9 cfe-6.0.1.src.tar.xz
+sha512sums="df2f38153ebdc261bcfa6a569567f759bbb1a803192882a9d4eca55a47878166ac9057151a94ad341dc1281136547e4faa783a68070dfde2307b48cacd4b9194 cfe-7.0.1.src.tar.xz
44aa152d50822a9e1a223b9e07e150ffa830c55deb4c4ca29e6218a0103eb263a00b41fd1ca84390e65fa08005901a0a0f88cf529bff8764220e99d06adef5fc 0001-Add-support-for-Ad-lie-Linux.patch
9485fe4fd6182df543735ed8f4ce618693d0faeafa86d3f9574a6c7abf50978e2d56e0a94be3ed94d515cc937c388d66ceff1bbc9bb120d371b6d3e95340da00 0008-Fix-ClangConfig-cmake-LLVM-path.patch
8a596e7369b5791e7e9c3278320aa5bac30d91f27d9a0df335ea862c359623869353d12145c3b64730f721600522f3acc5abe706428091482e0209e4ff308175 use-llvm-lit.patch
-23c3de4f8cbfa115b337ee115b4f95eb1ce3b8c6451de590b0ecf196a4b3bc96ab1d88029edf7f0c51299dffb7b2a05cade9c64c72dba18d858686466bb82bad secure-plt.patch"
+9dad6dfb0097f79939b743dbe7ed20274c463d9c41f061a957841c60070247a4760b676465652e2e844fc75aab9a5b7f9f4dd7632f2ff5dd5b0a335fcbd29312 secure-plt.patch"
diff --git a/user/clang/secure-plt.patch b/user/clang/secure-plt.patch
index c1b4cb1de..a92071e52 100644
--- a/user/clang/secure-plt.patch
+++ b/user/clang/secure-plt.patch
@@ -1,70 +1,11 @@
-Index: cfe/include/clang/Driver/Options.td
-===================================================================
---- cfe/include/clang/Driver/Options.td
-+++ cfe/include/clang/Driver/Options.td
-@@ -1957,6 +1957,7 @@
- def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
- def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
- def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
-+def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
- def mpower8_vector : Flag<["-"], "mpower8-vector">,
- Group<m_ppc_Features_Group>;
- def mno_power8_vector : Flag<["-"], "mno-power8-vector">,
-Index: cfe/lib/Driver/ToolChains/Arch/PPC.h
-===================================================================
---- cfe/lib/Driver/ToolChains/Arch/PPC.h
-+++ cfe/lib/Driver/ToolChains/Arch/PPC.h
-@@ -29,10 +29,17 @@
- Hard,
- };
-
-+enum class ReadGOTPtrMode {
-+ Bss,
-+ SecurePlt,
-+};
-+
- FloatABI getPPCFloatABI(const Driver &D, const llvm::opt::ArgList &Args);
-
- std::string getPPCTargetCPU(const llvm::opt::ArgList &Args);
- const char *getPPCAsmModeForCPU(StringRef Name);
-+ReadGOTPtrMode getPPCReadGOTPtrMode(const Driver &D,
-+ const llvm::opt::ArgList &Args);
-
- void getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple,
- const llvm::opt::ArgList &Args,
-Index: cfe/lib/Driver/ToolChains/Arch/PPC.cpp
-===================================================================
---- cfe/lib/Driver/ToolChains/Arch/PPC.cpp
-+++ cfe/lib/Driver/ToolChains/Arch/PPC.cpp
-@@ -106,6 +106,16 @@
- ppc::FloatABI FloatABI = ppc::getPPCFloatABI(D, Args);
- if (FloatABI == ppc::FloatABI::Soft)
- Features.push_back("-hard-float");
-+
-+ ppc::ReadGOTPtrMode ReadGOT = ppc::getPPCReadGOTPtrMode(D, Args);
-+ if (ReadGOT == ppc::ReadGOTPtrMode::SecurePlt)
-+ Features.push_back("+secure-plt");
-+}
-+
-+ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Driver &D, const ArgList &Args) {
-+ if (Args.getLastArg(options::OPT_msecure_plt))
-+ return ppc::ReadGOTPtrMode::SecurePlt;
-+ return ppc::ReadGOTPtrMode::Bss;
- }
-
- ppc::FloatABI ppc::getPPCFloatABI(const Driver &D, const ArgList &Args) {
-Index: cfe/test/Driver/ppc-features.cpp
-===================================================================
---- cfe/test/Driver/ppc-features.cpp
-+++ cfe/test/Driver/ppc-features.cpp
-@@ -22,6 +22,10 @@
- // RUN: %clang -target powerpc-unknown-linux-gnu %s -msoft-float -mhard-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SOFTHARD %s
- // CHECK-SOFTHARD-NOT: "-target-feature" "-hard-float"
-
-+// check -msecure-plt option for ppc32
-+// RUN: %clang -target powerpc-unknown-linux-gnu -msecure-plt %s -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SECUREPLT %s
-+// CHECK-SECUREPLT: "-target-feature" "+secure-plt"
-+
- // check -mfloat-abi=x option
- // RUN: %clang -target powerpc-unknown-linux-gnu %s -mfloat-abi=x -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ERRMSG %s
- // CHECK-ERRMSG: error: invalid float ABI '-mfloat-abi=x'
+--- cfe-7.0.1.src/lib/Driver/ToolChains/Arch/PPC.cpp.old 2018-11-29 00:31:15.000000000 +0000
++++ cfe-7.0.1.src/lib/Driver/ToolChains/Arch/PPC.cpp 2019-03-10 04:37:49.350000000 +0000
+@@ -116,7 +116,7 @@
+ const ArgList &Args) {
+ if (Args.getLastArg(options::OPT_msecure_plt))
+ return ppc::ReadGOTPtrMode::SecurePlt;
+- if (Triple.isOSOpenBSD())
++ if (Triple.isOSOpenBSD() || Triple.isMusl())
+ return ppc::ReadGOTPtrMode::SecurePlt;
+ else
+ return ppc::ReadGOTPtrMode::Bss;