From patchwork Wed Feb 5 11:45:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2755 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48CKWl3B6mz3xyK for ; Wed, 5 Feb 2020 11:45:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48CKWk35byz6ZP; Wed, 5 Feb 2020 11:45:54 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48CKWk0GG5z2yW9; Wed, 5 Feb 2020 11:45:54 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48CKWh2ByPz2xrx for ; Wed, 5 Feb 2020 11:45:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48CKWg5jgFz4HN; Wed, 5 Feb 2020 11:45:51 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580903151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tf5/67IPFl5CMTZ4oY8scuMIZ9bXzJnLTciRZfQ3MZU=; b=GB+wQSaoBbBiRW+c0V6ULV1qxYeZER8crjLTPudDyo8A23uQ4TEh23RT/wNN5o1d7S0yx5 6YxaOqpkzNX5A1CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580903151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tf5/67IPFl5CMTZ4oY8scuMIZ9bXzJnLTciRZfQ3MZU=; b=d8N5NJmylxJdIbf4ZDTrArZuPm2Yh+yBeDM7pRQYMXWqEpEWBYW7DCiVXILiIrX3OpeMeT qdkhtESGu2JH+3KOI9eRaLYzMe1gPSLXiNXobkH/sFxAt7tuTZiRaJk7lWjVXKykTaAMY5 iMalM860ITKAGT/r3q4K9VGJ+Eubp8Zq68PBflI+8T07Nj/BQLGCrlZEWsG3VdyKUZ6dLa Etti6k03DuYxTYCsW2J3BOV1AcxblinQiBXDx1W4F5xc3Pl+MNDVOy4SXNb3zOpKeZVgJk y0RjxJ69ivoVF2P/jrTIra3jM6idluE4UfQ7GAxif7HAUICZkyNcrlsnBoBjWA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/5] gcc: Fix build with glibc 2.31 Date: Wed, 5 Feb 2020 11:45:43 +0000 Message-Id: <20200205114547.16047-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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_DL)/$(DL_FILE) @mkdir $(DIR_SRC)/gcc-build + 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/Makefile.in cd $(DIR_APP) && sed -i gcc/Makefile.in \ -e 's@\./fixinc\.sh@-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_limits_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_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 + +diff -Nur gcc-9.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_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_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)