aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/gcc/APKBUILD8
-rw-r--r--main/gcc/futex-time64.patch21
2 files changed, 28 insertions, 1 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index afffad628f6..1f97eba0724 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -6,7 +6,7 @@ pkgver=9.3.0
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname="$pkgname$_target"
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="https://gcc.gnu.org"
arch="all"
@@ -175,6 +175,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
gcc-4.9-musl-fortify.patch
gcc-6.1-musl-libssp.patch
gcc-pure64.patch
+ futex-time64.patch
fix-cxxflags-passing.patch
ada-shared.patch
@@ -440,6 +441,10 @@ libcxx() {
pkgdesc="GNU C++ standard runtime library"
depends=
+ # verify that we are using clock_gettime rather than doing direct syscalls
+ # so we dont break 32 bit arches due to time64.
+ nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
+
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
}
@@ -634,6 +639,7 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
+5b12af738349a22346589e53e7ab7d37a065b7f4c756aab4c1cc1b4753cdf9ad1bf198f4e4783ae10232df63da0855591bab2452b50ac96a08905972d93c1b0e futex-time64.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch
cceeac95f47ea8664e1c16c5ebecb472b5aaa56040e943c1b97c7873b50e3a2bf972d9f743d342a2444a3bb711a0720d2446fded43892c5e05bdeefd478b0cd1 ada-musl.patch
diff --git a/main/gcc/futex-time64.patch b/main/gcc/futex-time64.patch
new file mode 100644
index 00000000000..b02c1ff2b4b
--- /dev/null
+++ b/main/gcc/futex-time64.patch
@@ -0,0 +1,21 @@
+needed for musl 1.2 and time64.
+Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93421
+
+--- gcc-9.2.0/libstdc++-v3/src/c++11/futex.cc.orig 2020-01-20 14:55:05.507548334 -0500
++++ gcc-9.2.0/libstdc++-v3/src/c++11/futex.cc 2020-01-20 14:56:52.458268068 -0500
+@@ -61,7 +61,15 @@
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ // Convert the absolute timeout value to a relative timeout
++#if defined(SYS_futex_time64)
++ struct
++ {
++ long tv_sec;
++ long tv_nsec;
++ } rt;
++#else
+ struct timespec rt;
++#endif
+ rt.tv_sec = __s.count() - tv.tv_sec;
+ rt.tv_nsec = __ns.count() - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)