diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2021-08-20 06:44:57 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-08-21 20:54:08 +0700 |
commit | d9c895cb3b90d176ff6f6ae9aa1897d80109dc59 (patch) | |
tree | 2e6f64dc38a9cd79afa601f9a45b50751431782d /development | |
parent | a4afab09f08de590484527a9a1bd3fcfba8a8f7d (diff) |
development/gcc5: Fix building with recents glibc, gcc and kernels.
Abort on errors (and fixed what made the build stop)
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/gcc5/gcc5.SlackBuild | 27 | ||||
-rw-r--r-- | development/gcc5/patches/glibc2.30-ipc_perm.diff | 12 | ||||
-rw-r--r-- | development/gcc5/patches/kernel-5.12.diff | 37 |
3 files changed, 67 insertions, 9 deletions
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild index f8181187cbee3..502a79cd7caef 100644 --- a/development/gcc5/gcc5.SlackBuild +++ b/development/gcc5/gcc5.SlackBuild @@ -150,6 +150,8 @@ LANGS=${LANGS:-'c,c++,java'} echo "Building these compilers: $LANGS" +set -e + case "$ARCH" in arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; *) TARGET=$ARCH-slackware-linux ;; @@ -212,6 +214,12 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) # Fix build with glibc 2.28, which no longer makes available header file <sys/ustat.h> cat $CWD/patches/glibc2.28-ustat.diff | patch -p0 --verbose || exit 1 + # Fix build with glibc 2.30 + cat $CWD/patches/glibc2.30-ipc_perm.diff | patch -p0 --verbose || exit 1 + + # Recent linux kernels have romved the Cyclades driver + cat $CWD/patches/kernel-5.12.diff | patch -p1 --verbose || exit 1 + # Fix perms/owners chown -R root:root . find . -perm 777 -exec chmod 755 {} \; @@ -220,9 +228,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) find . -perm 664 -exec chmod 644 {} \; mkdir -p $PKG/usr/doc/gcc-$VERSION cp -a \ - COPYING* ChangeLog* FAQ INSTALL \ + COPYING* ChangeLog* INSTALL \ LAST_UPDATED MAINTAINERS NEWS \ - README* *.html \ + README* \ $PKG/usr/doc/gcc-$VERSION # We will keep part of these, but they are really big... @@ -428,7 +436,8 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) $GCC_ARCHOPTS \ --target=${TARGET} \ --build=${TARGET} \ - --host=${TARGET} || exit 1 + --host=${TARGET} \ + CXX='g++ -std=c++14' || exit 1 #--enable-java-awt=gtk \ #--disable-gtktest \ @@ -540,12 +549,12 @@ ln -s ../../../bin/ecj $PKG/usr/lib$LIBDIRSUFFIX/jvm/bin/javac # Don't package libffi stuff anymore. GCC will link the internal version # statically, and we'll need a newer one elsewhere. find . -name "ffi*.h" | xargs rm -f -find . -name "libffi*" | xargs rm -f -rm -f usr/man/man3/ffi* -rm -f usr/info/libffi* +find . -name "libffi*" | xargs rm -fR +rm -f usr/man/man3/ffi* || true +rm -f usr/info/libffi* || true # Install a proper pkgconfig file for libgcj: -rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/pkgconfig/libgcj*pc -rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/32/pkgconfig/libgcj*pc +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/pkgconfig/libgcj*pc +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/32/pkgconfig/libgcj*pc || true mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig cat $CWD/libgcj-5.pc \ | sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX}," \ @@ -569,7 +578,7 @@ cat $CWD/libgcj-5.pc \ strip --strip-unneeded usr/bin/* 2> /dev/null find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +) || true # Remove localizations overlapping with Slackware's gcc rm -rf $PKG/usr/share/locale diff --git a/development/gcc5/patches/glibc2.30-ipc_perm.diff b/development/gcc5/patches/glibc2.30-ipc_perm.diff new file mode 100644 index 0000000000000..d1a75dd56e557 --- /dev/null +++ b/development/gcc5/patches/glibc2.30-ipc_perm.diff @@ -0,0 +1,12 @@ +--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2020-02-28 11:49:29.763277856 +0000
++++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2020-02-28 11:49:45.092909823 +0000
+@@ -198,8 +198,7 @@
+ unsigned long long __unused1;
+ unsigned long long __unused2;
+ #else
+- unsigned short mode;
+- unsigned short __pad1;
++ unsigned int mode;
+ unsigned short __seq;
+ unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
\ No newline at end of file diff --git a/development/gcc5/patches/kernel-5.12.diff b/development/gcc5/patches/kernel-5.12.diff new file mode 100644 index 0000000000000..fb2c7e597c178 --- /dev/null +++ b/development/gcc5/patches/kernel-5.12.diff @@ -0,0 +1,37 @@ +(this patch has to be applied after the glibc-2.28 one) + +diff -Naur gcc-5.5.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +--- gcc-5.5.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2021-08-19 12:21:14.786000000 +0200 ++++ gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2021-08-19 12:22:30.135000000 +0200 +@@ -138,7 +138,6 @@ + #include <sys/statvfs.h> + #include <sys/timex.h> + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -387,7 +386,6 @@ + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -754,15 +752,6 @@ + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; |