summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-07 09:30:14 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-09 15:21:38 -0500
commit232a2f432bb83c622a9360dc53675b32f72edad4 (patch)
treef1e8a1c7dadc985115ba16efd9549c8aace7479b
parentddea10d9c5217bb01c06ce8d28e58dc73bf3a901 (diff)
downloadpackages-232a2f432bb83c622a9360dc53675b32f72edad4.tar.gz
packages-232a2f432bb83c622a9360dc53675b32f72edad4.tar.bz2
packages-232a2f432bb83c622a9360dc53675b32f72edad4.tar.xz
packages-232a2f432bb83c622a9360dc53675b32f72edad4.zip
user/llvm18: Tweaks and fixes
* DWARFLinker and friends: most of the test errors are related to musl's thread stack size. Use chelf instead of disabling the tests. They pass on gwyn now, but there are still two flaky dsymutil tests. * Ensure the libLLVM.so.18 library is still present in /usr/lib/llvm18. * Install llvm-gtest, needed for Clang's test suite.
-rw-r--r--user/llvm18/APKBUILD29
1 files changed, 10 insertions, 19 deletions
diff --git a/user/llvm18/APKBUILD b/user/llvm18/APKBUILD
index 8bcd3067f..be4c09108 100644
--- a/user/llvm18/APKBUILD
+++ b/user/llvm18/APKBUILD
@@ -80,23 +80,12 @@ prepare() {
rm test/tools/llvm-size/radix.test;;
esac
- # https://github.com/llvm/llvm-project/issues/96734
case $CARCH in
ppc64|ppc|mips64|mips)
# Appears to be a endianness issue.
for _broken in eh_frame linker-llvm-union-fwd-decl; do
rm test/tools/dsymutil/X86/$_broken.test;
done
- for _broken in accelerator-dwarf4 accelerator-dwarf5 \
- dwarf4-macro-short; do
- rm test/tools/llvm-dwarfutil/ELF/X86/$_broken.test;
- done
- for _broken in inlined-static-variable.cpp keep-func.test \
- odr-fwd-declaration2.test odr-member-functions.cpp \
- odr-predictable-output2.test odr-string.test \
- odr-types-in-subprogram1.test odr-uniquing.cpp; do
- rm test/tools/dsymutil/X86/DWARFLinkerParallel/$_broken
- done;;
esac
case $CTARGET_ARCH in
@@ -133,10 +122,6 @@ prepare() {
done
esac
- # appears to be an issue on musl and glibc, but only fails on musl:
- # https://github.com/NixOS/nixpkgs/blob/bb7e9e46/pkgs/development/compilers/llvm/8/llvm.nix#L74
- # rm -f test/CodeGen/AArch64/wineh4.mir
-
#1053
rm -fr \
test/tools/UpdateTestChecks \
@@ -183,6 +168,7 @@ build() {
-DLLVM_HOST_TRIPLE="$CHOST" \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INSTALL_GTEST=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_TARGETS_TO_BUILD='AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86;XCore' \
@@ -194,6 +180,13 @@ build() {
make -C build
python3 utils/lit/setup.py build
+
+ # Thread 3 requires a lot of stack space to LTO when targeting ARM.
+ # Note that this occurs even when crossing (on a ppc64 host).
+ chelf -s 1048576 build/bin/llvm-lto2
+ # Needed for parallel-linker support (pthread stack size).
+ chelf -s 1048576 build/bin/dsymutil
+ chelf -s 1048576 build/bin/llvm-dwarfutil
}
check() {
@@ -210,10 +203,6 @@ package() {
| awk -F: '$2~/ELF/{print $1}' \
| xargs -r chrpath -d
- # Thread 3 requires a lot of stack space to LTO when targeting ARM.
- # Note that this occurs even when crossing (on a ppc64 host).
- chelf -s 1048576 bin/llvm-lto2
-
# Symlink files from /usr/lib/llvm*/bin to /usr/bin.
mkdir -p "$pkgdir"/usr/bin
for full_name in bin/*; do
@@ -272,6 +261,8 @@ libs() {
ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$main_soname
ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$ver_soname
ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/libLLVM.so
+ ln -s ../../$main_soname \
+ "$subpkgdir"/$_prefix/lib/$(basename "$pkgdir"/$_prefix/lib/libLLVM.so.$_majorver*)
}
dev() {