From 55a5edf51dba79222561c82d1ef5514ab936677f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 22 Oct 2019 13:00:33 +0300 Subject: [PATCH] clang: remove unneeded patches --- extra/clang/build | 3 - extra/clang/checksums | 2 - extra/clang/depends | 5 +- .../cfe-003-fix-unwind-chain-inclusion.patch | 45 --------- .../patches/cfe-004-add-musl-triples.patch | 91 ------------------- extra/clang/sources | 2 - 6 files changed, 3 insertions(+), 145 deletions(-) delete mode 100644 extra/clang/patches/cfe-003-fix-unwind-chain-inclusion.patch delete mode 100644 extra/clang/patches/cfe-004-add-musl-triples.patch diff --git a/extra/clang/build b/extra/clang/build index 17ff7f04..8bf33bfa 100755 --- a/extra/clang/build +++ b/extra/clang/build @@ -1,8 +1,5 @@ #!/bin/sh -e -patch -p1 < cfe-003-fix-unwind-chain-inclusion.patch -patch -p1 < cfe-004-add-musl-triples.patch - mkdir -p build cd build diff --git a/extra/clang/checksums b/extra/clang/checksums index 438e2087..53cd6a2f 100644 --- a/extra/clang/checksums +++ b/extra/clang/checksums @@ -1,3 +1 @@ 7ba81eef7c22ca5da688fdf9d88c20934d2d6b40bfe150ffd338900890aa4610 cfe-9.0.0.src.tar.xz -afda9a77cb75a47edaeda079498713b22462ec32018ddecd3a7d1e46a72f2c67 cfe-003-fix-unwind-chain-inclusion.patch -4cda0a3b37cc62ea65771675d5621de1e385afae9e4bb0446fff378cacba1a14 cfe-004-add-musl-triples.patch diff --git a/extra/clang/depends b/extra/clang/depends index e3e0bf76..7a0f0b0e 100644 --- a/extra/clang/depends +++ b/extra/clang/depends @@ -1,4 +1,5 @@ cmake make -python make -zlib make llvm +python make +xz +zlib diff --git a/extra/clang/patches/cfe-003-fix-unwind-chain-inclusion.patch b/extra/clang/patches/cfe-003-fix-unwind-chain-inclusion.patch deleted file mode 100644 index a399ac17..00000000 --- a/extra/clang/patches/cfe-003-fix-unwind-chain-inclusion.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni -Date: Tue, 8 Sep 2015 22:14:57 +0200 -Subject: [PATCH 2/7] fix unwind chain inclusion - ---- - lib/Headers/unwind.h | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h -index 303d792..44e10cc 100644 ---- a/lib/Headers/unwind.h -+++ b/lib/Headers/unwind.h -@@ -23,9 +23,6 @@ - - /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/ - --#ifndef __CLANG_UNWIND_H --#define __CLANG_UNWIND_H -- - #if defined(__APPLE__) && __has_include_next() - /* Darwin (from 11.x on) provide an unwind.h. If that's available, - * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE, -@@ -53,6 +50,9 @@ - # endif - #else - -+#ifndef __CLANG_UNWIND_H -+#define __CLANG_UNWIND_H -+ - #include - - #ifdef __cplusplus -@@ -277,6 +277,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); - } - #endif - -+#endif /* __CLANG_UNWIND_H */ -+ - #endif - --#endif /* __CLANG_UNWIND_H */ --- -2.5.1 - diff --git a/extra/clang/patches/cfe-004-add-musl-triples.patch b/extra/clang/patches/cfe-004-add-musl-triples.patch deleted file mode 100644 index 3d4972f7..00000000 --- a/extra/clang/patches/cfe-004-add-musl-triples.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/lib/Driver/ToolChains/Gnu.cpp.orig 2019-03-30 15:08:33.136000000 +0100 -+++ b/lib/Driver/ToolChains/Gnu.cpp 2019-03-30 15:10:24.666000000 +0100 -@@ -1882,7 +1882,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", - "armv7hl-redhat-linux-gnueabi", - "armv6hl-suse-linux-gnueabi", -- "armv7hl-suse-linux-gnueabi"}; -+ "armv7hl-suse-linux-gnueabi", -+ "armv7l-linux-gnueabihf"}; - static const char *const ARMebLibDirs[] = {"/lib"}; - static const char *const ARMebTriples[] = {"armeb-linux-gnueabi", - "armeb-linux-androideabi"}; -@@ -2014,6 +2015,78 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - return; - } - -+ if (TargetTriple.isMusl()) { -+ static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"}; -+ static const char *const ARMHFMuslTriples[] = { -+ "arm-linux-musleabihf", "armv7l-linux-musleabihf" -+ }; -+ static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"}; -+ static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"}; -+ static const char *const X86MuslTriples[] = {"i686-linux-musl"}; -+ static const char *const MIPSMuslTriples[] = { -+ "mips-linux-musl", "mipsel-linux-musl", -+ "mipsel-linux-muslhf", "mips-linux-muslhf" -+ }; -+ static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"}; -+ static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"}; -+ static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"}; -+ -+ switch (TargetTriple.getArch()) { -+ case llvm::Triple::aarch64: -+ LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); -+ TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); -+ BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); -+ BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); -+ break; -+ case llvm::Triple::arm: -+ LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs)); -+ if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) { -+ TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples)); -+ } else { -+ TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples)); -+ } -+ break; -+ case llvm::Triple::x86_64: -+ LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); -+ TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); -+ BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs)); -+ BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); -+ break; -+ case llvm::Triple::x86: -+ LibDirs.append(begin(X86LibDirs), end(X86LibDirs)); -+ TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); -+ BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); -+ BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); -+ break; -+ case llvm::Triple::mips: -+ LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs)); -+ TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples)); -+ break; -+ case llvm::Triple::ppc: -+ LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); -+ TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); -+ BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); -+ BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); -+ break; -+ case llvm::Triple::ppc64: -+ LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); -+ TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); -+ BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); -+ BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); -+ break; -+ case llvm::Triple::ppc64le: -+ LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); -+ TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples)); -+ break; -+ default: -+ break; -+ } -+ TripleAliases.push_back(TargetTriple.str()); -+ if (TargetTriple.str() != BiarchTriple.str()) -+ BiarchTripleAliases.push_back(BiarchTriple.str()); -+ return; -+ } -+ - // Android targets should not use GNU/Linux tools or libraries. - if (TargetTriple.isAndroid()) { - static const char *const AArch64AndroidTriples[] = { diff --git a/extra/clang/sources b/extra/clang/sources index c26a683d..1c1883f3 100644 --- a/extra/clang/sources +++ b/extra/clang/sources @@ -1,3 +1 @@ https://releases.llvm.org/9.0.0/cfe-9.0.0.src.tar.xz -patches/cfe-003-fix-unwind-chain-inclusion.patch -patches/cfe-004-add-musl-triples.patch