mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-07 14:02:59 +00:00
Add patch to fix riscv64 builds from Ubuntu, where not all gcc packages are installed
This commit is contained in:
parent
204cffaf4c
commit
7e77b1ae33
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,8 +1,16 @@
|
|||||||
llvm-toolchain-9 (1:9.0.1-12) UNRELEASED; urgency=medium
|
llvm-toolchain-9 (1:9.0.1-12) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
[ Jessica Clarke ]
|
||||||
* Cherry-pick upstream patch D74453 to fix atomic compare-and-swap on
|
* Cherry-pick upstream patch D74453 to fix atomic compare-and-swap on
|
||||||
riscv64.
|
riscv64.
|
||||||
|
|
||||||
|
[ William Grant ]
|
||||||
|
* debian/patches/riscv64-multilib-empty.patch: Adjust riscv64 GCC detector
|
||||||
|
to also check for existence of crtbegin.o in the default multilib dir,
|
||||||
|
like most other ports. Fixes FTBFS on riscv64, since on Ubuntu
|
||||||
|
/usr/lib/gcc/riscv64-linux-gnu/10 exists but is empty (gcc-10-base is
|
||||||
|
installed, but libgcc-10-dev is not).
|
||||||
|
|
||||||
-- Jessica Clarke <jrtc27@debian.org> Wed, 01 Apr 2020 16:23:55 +0100
|
-- Jessica Clarke <jrtc27@debian.org> Wed, 01 Apr 2020 16:23:55 +0100
|
||||||
|
|
||||||
llvm-toolchain-9 (1:9.0.1-11) unstable; urgency=medium
|
llvm-toolchain-9 (1:9.0.1-11) unstable; urgency=medium
|
||||||
|
51
debian/patches/riscv64-multilib-empty.patch
vendored
Normal file
51
debian/patches/riscv64-multilib-empty.patch
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
Index: llvm-toolchain-9-9.0.1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-9-9.0.1.orig/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||||
|
+++ llvm-toolchain-9-9.0.1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||||
|
@@ -1502,11 +1502,12 @@ static bool findMSP430Multilibs(const Dr
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void findRISCVMultilibs(const Driver &D,
|
||||||
|
+static bool findRISCVMultilibs(const Driver &D,
|
||||||
|
const llvm::Triple &TargetTriple, StringRef Path,
|
||||||
|
const ArgList &Args, DetectedMultilibs &Result) {
|
||||||
|
|
||||||
|
FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS());
|
||||||
|
+ Multilib Default;
|
||||||
|
Multilib Ilp32 = makeMultilib("lib32/ilp32").flag("+m32").flag("+mabi=ilp32");
|
||||||
|
Multilib Ilp32f =
|
||||||
|
makeMultilib("lib32/ilp32f").flag("+m32").flag("+mabi=ilp32f");
|
||||||
|
@@ -1517,7 +1518,7 @@ static void findRISCVMultilibs(const Dri
|
||||||
|
Multilib Lp64d = makeMultilib("lib64/lp64d").flag("+m64").flag("+mabi=lp64d");
|
||||||
|
MultilibSet RISCVMultilibs =
|
||||||
|
MultilibSet()
|
||||||
|
- .Either({Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d})
|
||||||
|
+ .Either({Default, Ilp32, Ilp32f, Ilp32d, Lp64, Lp64f, Lp64d})
|
||||||
|
.FilterOut(NonExistent);
|
||||||
|
|
||||||
|
Multilib::flags_list Flags;
|
||||||
|
@@ -1533,8 +1534,11 @@ static void findRISCVMultilibs(const Dri
|
||||||
|
addMultilibFlag(ABIName == "lp64f", "mabi=lp64f", Flags);
|
||||||
|
addMultilibFlag(ABIName == "lp64d", "mabi=lp64d", Flags);
|
||||||
|
|
||||||
|
- if (RISCVMultilibs.select(Flags, Result.SelectedMultilib))
|
||||||
|
- Result.Multilibs = RISCVMultilibs;
|
||||||
|
+ if (!RISCVMultilibs.select(Flags, Result.SelectedMultilib))
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ Result.Multilibs = RISCVMultilibs;
|
||||||
|
+ return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool findBiarchMultilibs(const Driver &D,
|
||||||
|
@@ -2309,7 +2313,8 @@ bool Generic_GCC::GCCInstallationDetecto
|
||||||
|
if (!findMIPSMultilibs(D, TargetTriple, Path, Args, Detected))
|
||||||
|
return false;
|
||||||
|
} else if (TargetTriple.isRISCV()) {
|
||||||
|
- findRISCVMultilibs(D, TargetTriple, Path, Args, Detected);
|
||||||
|
+ if (!findRISCVMultilibs(D, TargetTriple, Path, Args, Detected))
|
||||||
|
+ return false;
|
||||||
|
} else if (isMSP430(TargetArch)) {
|
||||||
|
findMSP430Multilibs(D, TargetTriple, Path, Args, Detected);
|
||||||
|
} else if (TargetArch == llvm::Triple::avr) {
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -144,3 +144,4 @@ python3-shebang.patch
|
|||||||
print-lldb-path.patch
|
print-lldb-path.patch
|
||||||
no-cgi.patch
|
no-cgi.patch
|
||||||
947f9692440836dcb8d88b74b69dd379d85974ce.patch
|
947f9692440836dcb8d88b74b69dd379d85974ce.patch
|
||||||
|
riscv64-multilib-empty.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user