From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 1/5] gcc: Fix build with glibc 2.31 Date: Wed, 05 Feb 2020 11:46:46 +0000 Message-ID: <4A312AE1-D24B-452E-9097-FD50FC6DEDEF@ipfire.org> In-Reply-To: <20200205114547.16047-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5724393587260407364==" List-Id: --===============5724393587260407364== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, I forgot to add that this patchset needs dropping cyrus-imapd and squid 4.10 = in order to build. Best, -Michael > On 5 Feb 2020, at 11:45, Michael Tremer wrote: >=20 > 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 >=20 > 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_= DL)/$(DL_FILE) > @mkdir $(DIR_SRC)/gcc-build >=20 > + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-9.2.0-fix-build-= against-glibc-2.31.patch > + > cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makef= ile.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= /patches/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_= limits_posix.cc gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_li= mits_posix.cc > +--- gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits= _posix.cc 2020-02-03 17:34:44.375766043 +0000 > ++++ gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posi= x.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_= limits_posix.h gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_lim= its_posix.h > +--- gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits= _posix.h 2020-02-03 17:34:44.375766043 +0000 > ++++ gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posi= x.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 >=20 --===============5724393587260407364==--