1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/clang/gcc-path.patch
3 # Copyright (C) 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- clang-13.0.0.src/lib/Driver/ToolChains/Gnu.cpp.orig 2021-09-24 18:18:10.000000000 +0200
15 +++ clang-13.0.0.src/lib/Driver/ToolChains/Gnu.cpp 2021-10-01 17:11:15.769342526 +0200
16 @@ -2078,20 +2078,16 @@
17 static const char *const AArch64Triples[] = {
18 - "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
19 - "aarch64-suse-linux", "aarch64-linux-android"};
20 + "aarch64-t2-linux-gnu", "aarch64-t2-linux-musl"};
21 static const char *const AArch64beLibDirs[] = {"/lib"};
22 - static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
23 - "aarch64_be-linux-gnu"};
24 + static const char *const AArch64beTriples[] = {"aarch64_be-t2-linux-gnu",
25 + "aarch64_be-t2-linux-musl"};
27 static const char *const ARMLibDirs[] = {"/lib"};
28 - static const char *const ARMTriples[] = {"arm-linux-gnueabi",
29 - "arm-linux-androideabi"};
30 - static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
31 - "armv7hl-redhat-linux-gnueabi",
32 - "armv6hl-suse-linux-gnueabi",
33 - "armv7hl-suse-linux-gnueabi"};
34 + static const char *const ARMTriples[] = {"arm-t2-linux-gnueabi",
35 + "arm-t2-linux-musl"};
36 + static const char *const ARMHFTriples[] = {"arm-t2-linux-gnueabihf"};
37 static const char *const ARMebLibDirs[] = {"/lib"};
38 - static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
39 - "armeb-linux-androideabi"};
40 + static const char *const ARMebTriples[] = {"armeb-t2-linux-gnueabi",
41 + "armeb-t2-linux-gnu"};
42 static const char *const ARMebHFTriples[] = {
43 - "armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi"};
44 + "armeb-t2-linux-gnueabihf"};
47 static const char *const X86_64Triples[] = {
48 - "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
49 - "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
50 - "x86_64-redhat-linux", "x86_64-suse-linux",
51 - "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
52 - "x86_64-slackware-linux", "x86_64-unknown-linux",
53 - "x86_64-amazon-linux", "x86_64-linux-android"};
54 + "x86_64-t2-linux-gnu", "x86_64-t2-linux-musl"};
55 static const char *const X32Triples[] = {"x86_64-linux-gnux32",
57 static const char *const X86Triples[] = {
58 - "i586-linux-gnu", "i686-linux-gnu",
59 - "i686-pc-linux-gnu", "i386-redhat-linux6E",
60 - "i686-redhat-linux", "i386-redhat-linux",
61 - "i586-suse-linux", "i686-montavista-linux",
62 - "i686-linux-android", "i686-gnu",
63 + "i386-t2-linux-gnu", "i486-t2-linux-gnu", "i586-t2-linux-gnu",
64 + "i686-t2-linux-gnu",
65 + "i386-t2-linux-musl", "i486-t2-linux-musl", "i586-t2-linux-musl",
66 + "i686-t2-linux-musl"
69 static const char *const MIPSTriples[] = {
70 - "mips-linux-gnu", "mips-mti-linux", "mips-mti-linux-gnu",
71 - "mips-img-linux-gnu", "mipsisa32r6-linux-gnu"};
72 + "mips-t2-linux-gnu", "mips-t2-linux-musl"};
73 static const char *const MIPSELLibDirs[] = {"/lib"};
74 static const char *const MIPSELTriples[] = {
75 - "mipsel-linux-gnu", "mips-img-linux-gnu", "mipsisa32r6el-linux-gnu",
76 - "mipsel-linux-android"};
77 + "mipsel-t2-linux-gnu", "mipsel-t2-linux-musl"};
79 @@ -2135,18 +2123,13 @@
80 static const char *const MIPS64Triples[] = {
81 - "mips64-linux-gnu", "mips-mti-linux-gnu",
82 - "mips-img-linux-gnu", "mips64-linux-gnuabi64",
83 - "mipsisa64r6-linux-gnu", "mipsisa64r6-linux-gnuabi64"};
84 + "mips64-t2-linux-gnu", "mips64-t2-linux-musl"};
85 static const char *const MIPS64ELLibDirs[] = {"/lib64", "/lib"};
86 static const char *const MIPS64ELTriples[] = {
87 - "mips64el-linux-gnu", "mips-mti-linux-gnu",
88 - "mips-img-linux-gnu", "mips64el-linux-gnuabi64",
89 - "mipsisa64r6el-linux-gnu", "mipsisa64r6el-linux-gnuabi64",
90 - "mips64el-linux-android"};
91 + "mips64el-t2-linux-gnu", "mips64el-t2-linux-musl"};
93 static const char *const MIPSN32LibDirs[] = {"/lib32"};
94 - static const char *const MIPSN32Triples[] = {"mips64-linux-gnuabin32",
95 - "mipsisa64r6-linux-gnuabin32"};
96 + static const char *const MIPSN32Triples[] = {"mips64-t2-linux-gnuabin32",
97 + "mips64-t2-linux-muslabin32"};
98 static const char *const MIPSN32ELLibDirs[] = {"/lib32"};
99 static const char *const MIPSN32ELTriples[] = {
100 - "mips64el-linux-gnuabin32", "mipsisa64r6el-linux-gnuabin32"};
101 + "mips64el-t2-linux-gnuabin32", "mips64el-t2-linux-muslabin32"};
103 @@ -2155,12 +2140,10 @@
105 - static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
106 + static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
107 static const char *const PPCTriples[] = {
108 - "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
109 // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a
110 // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux".
111 - "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
112 + "powerpc-t2-linux-gnu", "powerpc-t2-linux-musl"};
113 static const char *const PPCLELibDirs[] = {"/lib32", "/lib"};
114 - static const char *const PPCLETriples[] = {"powerpcle-linux-gnu",
115 - "powerpcle-unknown-linux-gnu",
116 - "powerpcle-linux-musl"};
117 + static const char *const PPCLETriples[] = {"powerpcle-t2-linux-gnu",
118 + "powerpcle-t2-linux-musl"};
120 @@ -2168,27 +2147,20 @@
121 static const char *const PPC64Triples[] = {
122 - "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",
123 - "powerpc64-suse-linux", "ppc64-redhat-linux"};
124 + "powerpc64-t2-linux-gnu", "powerpc64-t2-linux-musl"};
125 static const char *const PPC64LELibDirs[] = {"/lib64", "/lib"};
126 static const char *const PPC64LETriples[] = {
127 - "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu",
128 - "powerpc64le-none-linux-gnu", "powerpc64le-suse-linux",
129 - "ppc64le-redhat-linux"};
130 + "powerpc64le-t2-linux-gnu", "powerpc64le-t2-linux-musl"};
132 static const char *const RISCV32LibDirs[] = {"/lib32", "/lib"};
133 - static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu",
134 - "riscv32-linux-gnu",
135 - "riscv32-unknown-elf"};
136 + static const char *const RISCV32Triples[] = {"riscv32-t2-linux-gnu",
137 + "riscv32-t2-linux-musl"};
138 static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
139 - static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
140 - "riscv64-linux-gnu",
141 - "riscv64-unknown-elf",
142 - "riscv64-redhat-linux",
143 - "riscv64-suse-linux"};
144 + static const char *const RISCV64Triples[] = {"riscv64-t2-linux-gnu",
145 + "riscv64-t2-linux-musl"};
147 static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
148 - static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
149 - "sparcv8-linux-gnu"};
150 + static const char *const SPARCv8Triples[] = {"sparc-t2-linux-gnu",
151 + "sparc-t2-linux-musl"};
152 static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};
153 - static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",
154 - "sparcv9-linux-gnu"};
155 + static const char *const SPARCv9Triples[] = {"sparc64-t2-linux-gnu",
156 + "sparc64-t2-linux-musl"};
158 @@ -2196,4 +2168,3 @@
159 static const char *const SystemZTriples[] = {
160 - "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
161 - "s390x-suse-linux", "s390x-redhat-linux"};
162 + "s390x-t2-linux-gnu", "s390x-t2-linux-musl"};
164 --- clang-13.0.0.src/lib/Driver/ToolChains/PPCLinux.cpp.vanilla 2021-12-21 23:19:38.231936574 +0100
165 +++ clang-13.0.0.src/lib/Driver/ToolChains/PPCLinux.cpp 2021-12-21 23:20:38.411939678 +0100
168 void PPCLinuxToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
169 ArgStringList &CC1Args) const {
170 - if (!DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) &&
171 + if (false && !DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) &&
172 !DriverArgs.hasArg(options::OPT_nobuiltininc)) {
173 const Driver &D = getDriver();
174 SmallString<128> P(D.ResourceDir);