summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--glibc2.28-ustat.patch31
3 files changed, 43 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f226f7d..2b90241 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gcc5
pkgdesc = The GNU Compiler Collection (5.x.x)
pkgver = 5.5.0
- pkgrel = 2
+ pkgrel = 3
url = https://gcc.gnu.org/gcc-5/
arch = i686
arch = x86_64
@@ -15,8 +15,10 @@ pkgbase = gcc5
options = !emptydirs
source = https://gcc.gnu.org/pub/gcc/releases/gcc-5.5.0/gcc-5.5.0.tar.xz
source = http://isl.gforge.inria.fr/isl-0.18.tar.bz2
+ source = glibc2.28-ustat.patch
sha512sums = 670ff52c2ae12c7852c12987e91798c5aa8bd6daf21f0d6e0cd57a4aa59cc4f06a837fe76426eaa1424cfddca937bed377680700eadc04d76b9180d462364fa1
sha512sums = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
+ sha512sums = 633d96bf2d78d3187d8b26dd4c12b1b8fcbe784cbaa6f3b312326dc4ea118b3f0980bfd0e50cd6be79563dd29c296a2fafe056f4dbbb486414331cebcc1109bf
pkgname = gcc5
diff --git a/PKGBUILD b/PKGBUILD
index c05a9ba..008f04b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgname=('gcc5')
pkgver=5.5.0
_ver=5
_islver=0.18
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Compiler Collection (5.x.x)"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL' 'custom')
@@ -15,13 +15,18 @@ url="https://gcc.gnu.org/gcc-5/"
depends=('glibc' 'binutils' 'libmpc')
options=('!emptydirs')
source=(https://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz
- http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2)
+ http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+ glibc2.28-ustat.patch)
sha512sums=('670ff52c2ae12c7852c12987e91798c5aa8bd6daf21f0d6e0cd57a4aa59cc4f06a837fe76426eaa1424cfddca937bed377680700eadc04d76b9180d462364fa1'
- '85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94')
+ '85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94'
+ '633d96bf2d78d3187d8b26dd4c12b1b8fcbe784cbaa6f3b312326dc4ea118b3f0980bfd0e50cd6be79563dd29c296a2fafe056f4dbbb486414331cebcc1109bf')
prepare() {
cd gcc-$pkgver
+ # Fix build with glibc 2.28, which removes <sys/ustat.h>
+ patch -p0 -i "$srcdir/glibc2.28-ustat.patch"
+
# link isl for in-tree build
ln -s ../isl-${_islver} isl
@@ -56,7 +61,7 @@ build() {
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
- --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ \
+ --enable-languages=c,c++,fortran,lto \
--enable-shared --enable-threads=posix --enable-libmpx \
--with-system-zlib --with-isl --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
@@ -68,7 +73,6 @@ build() {
--enable-checking=release \
--program-suffix=-${_ver} \
--enable-version-specific-runtime-libs
- #--enable-install-libiberty
# without LD_PRELOAD, the build fails for some people with:
# [Makefile:605: libstdc++.la] Error 139
diff --git a/glibc2.28-ustat.patch b/glibc2.28-ustat.patch
new file mode 100644
index 0000000..c7d71d0
--- /dev/null
+++ b/glibc2.28-ustat.patch
@@ -0,0 +1,31 @@
+--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/04/25 07:39:32 259630
++++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/05/24 20:07:25 260687
+@@ -138,7 +138,6 @@
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -231,7 +230,19 @@
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+- unsigned struct_ustat_sz = sizeof(struct ustat);
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
++ // has been removed from glibc 2.28.
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
++ || defined(__x86_64__)
++#define SIZEOF_STRUCT_USTAT 32
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
++ || defined(__powerpc__) || defined(__s390__)
++#define SIZEOF_STRUCT_USTAT 20
++#else
++#error Unknown size of struct ustat
++#endif
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
+ unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+ unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID