From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/5] gcc: Fix build with glibc 2.31 Date: Wed, 05 Feb 2020 11:45:43 +0000 Message-ID: <20200205114547.16047-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1962236245836874890==" List-Id: --===============1962236245836874890== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- lfs/gcc | 2 + ...c-9.2.0-fix-build-against-glibc-2.31.patch | 46 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/patches/gcc-9.2.0-fix-build-against-glibc-2.31.patch diff --git a/lfs/gcc b/lfs/gcc index 224a94bc7..d4bb1aebe 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -224,6 +224,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_D= L)/$(DL_FILE) @mkdir $(DIR_SRC)/gcc-build =20 + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-9.2.0-fix-build-ag= ainst-glibc-2.31.patch + cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefi= le.in cd $(DIR_APP) && sed -i gcc/Makefile.in \ -e 's@\./fixinc\.sh(a)-c true@' \ diff --git a/src/patches/gcc-9.2.0-fix-build-against-glibc-2.31.patch b/src/p= atches/gcc-9.2.0-fix-build-against-glibc-2.31.patch new file mode 100644 index 000000000..dd2b11c66 --- /dev/null +++ b/src/patches/gcc-9.2.0-fix-build-against-glibc-2.31.patch @@ -0,0 +1,46 @@ +diff -Nur gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_li= mits_posix.cc gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limi= ts_posix.cc +--- gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_p= osix.cc 2020-02-03 17:34:44.375766043 +0000 ++++ gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.= cc 2020-02-03 17:36:04.054223577 +0000 +@@ -1156,8 +1156,9 @@ + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif +=20 +diff -Nur gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_li= mits_posix.h gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limit= s_posix.h +--- gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_p= osix.h 2020-02-03 17:34:44.375766043 +0000 ++++ gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.= h 2020-02-03 17:36:04.054223577 +0000 +@@ -211,26 +211,13 @@ + u64 __unused1; + u64 __unused2; + #elif defined(__sparc__) +-#if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-#else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-#endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) --=20 2.20.1 --===============1962236245836874890==--