summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-23 02:37:43 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:02 -0500
commit3bc4d7cb7938b8a770810666c639d28b05ab7779 (patch)
treee18c3e2855c1b189f8afb4ba7e30daef69d8b1bf
parent3b0d313f93f361ce1b8f1c41579ed0d48786ef7d (diff)
downloadpackages-3bc4d7cb7938b8a770810666c639d28b05ab7779.tar.gz
packages-3bc4d7cb7938b8a770810666c639d28b05ab7779.tar.bz2
packages-3bc4d7cb7938b8a770810666c639d28b05ab7779.tar.xz
packages-3bc4d7cb7938b8a770810666c639d28b05ab7779.zip
user/llvm14: Mark roundeven* unavailable on musl
-rw-r--r--user/llvm14/APKBUILD4
-rw-r--r--user/llvm14/roundeven.patch49
2 files changed, 52 insertions, 1 deletions
diff --git a/user/llvm14/APKBUILD b/user/llvm14/APKBUILD
index 886b1ea0a..8fe860fe1 100644
--- a/user/llvm14/APKBUILD
+++ b/user/llvm14/APKBUILD
@@ -26,6 +26,7 @@ source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/l
hexagon.patch
musl-ppc64-elfv2.patch
python3-test.patch
+ roundeven.patch
"
builddir="$srcdir/$_pkgname-$pkgver.src"
@@ -234,4 +235,5 @@ f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3ce
caeec8e4dbd92f5f74940780b69075f3879a267a8623822cbdc193fd14706eb089071e3a5a20d60cc2eca59e4c5b2a61d29827a2f3362ee7c5f74f11d9ace200 disable-dlclose-test.patch
9abe376068801a09b2af01eef0cd319f48862b5ff7cce62af3cf4e7597a0898842125ae574577b545734ec1381f192b924b4f717a9c094f119e32ada81a2b9a2 hexagon.patch
e5ddbc4b6c4928e79846dc3c022eb7928aaa8fed40515c78f5f03b8ab8264f34f1eb8aa8bfc0f436450932f4917e54ad261603032092ea271d9590f11a37cf1e musl-ppc64-elfv2.patch
-89ef5fbab039b017a5652656adf17b680525f1c5dd0b1afc8034fe0b34a2ca196d87640f54cc826356cfcd88c6e5f10754b7e38f04ca49ede4f3864080b787bd python3-test.patch"
+89ef5fbab039b017a5652656adf17b680525f1c5dd0b1afc8034fe0b34a2ca196d87640f54cc826356cfcd88c6e5f10754b7e38f04ca49ede4f3864080b787bd python3-test.patch
+dca77af49ea181ab8d41630b8e7575b83aac22686a1119479abf8fe22d8f13032d69ef83a9635b9ad9b935cd3b51251d939e05967ad40db43abf69ac40e0eccd roundeven.patch"
diff --git a/user/llvm14/roundeven.patch b/user/llvm14/roundeven.patch
new file mode 100644
index 000000000..04d741cdb
--- /dev/null
+++ b/user/llvm14/roundeven.patch
@@ -0,0 +1,49 @@
+--- llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp 2022-07-06 01:38:22.016862561 +0000
+@@ -588,6 +588,13 @@
+ TLI.setUnavailable(LibFunc_statvfs64);
+ TLI.setUnavailable(LibFunc_tmpfile64);
+
++ // These functions are unavailable on musl.
++ if (T.isMusl()) {
++ TLI.setUnavailable(LibFunc_roundeven);
++ TLI.setUnavailable(LibFunc_roundevenf);
++ TLI.setUnavailable(LibFunc_roundevenl);
++ }
++
+ // Relaxed math functions are included in math-finite.h on Linux (GLIBC).
+ // Note that math-finite.h is no longer supported by top-of-tree GLIBC,
+ // so we keep these functions around just so that they're recognized by
+--- llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll 2022-07-06 02:03:20.657791057 +0000
+@@ -1,5 +1,5 @@
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+-; RUN: opt < %s -instcombine -S -mtriple "i386-pc-linux" | FileCheck %s
++; RUN: opt < %s -instcombine -S -mtriple "i386-pc-linux-gnu" | FileCheck %s
+ ; RUN: opt < %s -instcombine -S -mtriple "i386-pc-win32" | FileCheck %s
+ ; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s
+ ; RUN: opt < %s -instcombine -S -mtriple "i386-pc-mingw32" | FileCheck %s
+--- llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll 2022-07-23 06:50:59.336665672 +0000
+@@ -13,8 +13,8 @@
+ declare double @llvm.trunc.f64(double)
+ declare float @llvm.round.f32(float)
+ declare double @llvm.round.f64(double)
+-declare float @llvm.roundeven.f32(float)
+-declare double @llvm.roundeven.f64(double)
++;declare float @llvm.roundeven.f32(float)
++;declare double @llvm.roundeven.f64(double)
+ declare float @llvm.copysign.f32(float, float)
+ declare double @llvm.copysign.f64(double, double)
+
+@@ -31,8 +31,8 @@
+ %trunc64 = call double @llvm.trunc.f64(double 0.000000e+00)
+ %round32 = call float @llvm.round.f32(float 0.000000e+00)
+ %round64 = call double @llvm.round.f64(double 0.000000e+00)
+- %roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
+- %roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
++ ;%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
++ ;%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
+ %copysign32 = call float @llvm.copysign.f32(float 0.000000e+00, float 0.000000e+00)
+ %copysign64 = call double @llvm.copysign.f64(double 0.000000e+00, double 0.000000e+00)
+ ret i32 0