From patchwork Thu Feb 6 18:02:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 20154 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F0935168DC; Thu, 6 Feb 2020 18:04:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 649A0168DB for ; Thu, 6 Feb 2020 18:04:21 +0000 (GMT) Received: from localhost ([::1]:44084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izlVk-000223-UD for patchwork@mira.cbaines.net; Thu, 06 Feb 2020 13:04:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53839) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izlVY-0001pW-WF for guix-patches@gnu.org; Thu, 06 Feb 2020 13:04:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izlVU-00019b-MU for guix-patches@gnu.org; Thu, 06 Feb 2020 13:04:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42453) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izlVU-00018Y-Gb for guix-patches@gnu.org; Thu, 06 Feb 2020 13:04:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1izlVU-0000Az-DQ for guix-patches@gnu.org; Thu, 06 Feb 2020 13:04:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39456] [PATCH 5/6] gnu: glibc: Update to 2.31. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Feb 2020 18:04:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39456@debbugs.gnu.org Received: via spool by 39456-submit@debbugs.gnu.org id=B39456.1581012196594 (code B ref 39456); Thu, 06 Feb 2020 18:04:04 +0000 Received: (at 39456) by debbugs.gnu.org; 6 Feb 2020 18:03:16 +0000 Received: from localhost ([127.0.0.1]:48421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izlUb-00009J-RD for submit@debbugs.gnu.org; Thu, 06 Feb 2020 13:03:16 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izlUR-00007j-FN for 39456@debbugs.gnu.org; Thu, 06 Feb 2020 13:03:01 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5F30C21CFD for <39456@debbugs.gnu.org>; Thu, 6 Feb 2020 13:02:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Feb 2020 13:02:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=UtKZs/i8cDcSP svUSOYkDuHTBfPU6EQnakw8xJgcYV0=; b=g4puKgxttemfycLlyIFbtMgpYvh8t Fu1b8CXz6mDbCFK6T099C/QYXqfkmDxQVu8EEQLl1qAHjamB/EFdpsIsTIFOvuUE 5tiGgtywxl0Ljx3VLSc7aG8ZsqeU4OTXITegzf7l+9M+wyVfgPE8MbmWhWemDlxl CFFjibzn+jwuBSvaow0qc80MJsyR97GWzlePv3bJDyA50eQtl7WYaRtH0w9WMn4l lJuMv17QEWslSGRur2n6jLwQvo62mb8b+6LpTCkuihAy2X6T3l84vWDaqTStAZgj LWlKl/jPFZ16xJpLgS/hOqo6P1JVTpLdfvwjCmTgeelC6g8dxBc1FAh1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=UtKZs/i8cDcSPsvUSOYkDuHTBfPU6EQnakw8xJgcYV0=; b=3hq2fBg3 duzgcI8blv2EmOk89446m9NLkkp4ZnUbTOQUppnEKRp71bfJDQVh77ZFo36WYebu yBkk1+FTQnEhlERs3r8Yue+zS9veij163V4tly6QEJo/x4lngEca8YVL857OFlxD tuxAXtU0iARN/avKyzu9/Qid8p+DyX8sRyNl1WbOkpNlfgoaGHRhV5D/NiSDDLZo xyenRp1HhJQhOxenHZbLHT0Jl5zLbUlpr3oWP38a+gG8nR+cgxVkuz3+OH7Odb/N I+dRUAzujSxlA9E78qKFPtSJ25lVpU81XA3h2y8BvprFV9OzBr8QxxUt0EB0Fily om1VPdquHHlKUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrheefgddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepofgrrhhiuhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghs thhmrghilhdrtghomheqnecuffhomhgrihhnpehgnhhurdhorhhgpdhllhhvmhdrohhrgh enucfkphepkeegrddvtddvrdeiledrvdehfeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehmsggrkhhkvgesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id E099F30606E9 for <39456@debbugs.gnu.org>; Thu, 6 Feb 2020 13:02:53 -0500 (EST) From: Marius Bakke Date: Thu, 6 Feb 2020 19:02:44 +0100 Message-Id: <20200206180245.12470-5-mbakke@fastmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200206180245.12470-1-mbakke@fastmail.com> References: <20200206180245.12470-1-mbakke@fastmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/glibc-supported-locales.patch: Adjust for upstream changes. * gnu/packages/patches/glibc-2.29-supported-locales.patch: New file, with previous contents. * gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gcc.scm (gcc-4.9, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9)[source](patches): Add the respective patch files. * gnu/packages/base.scm (glibc): Update to 2.31. [source](patches): Remove obsolete. (glibc-2.30): New public variable. (glibc-2.29)[source](patches): Adjust for renamed patch file. --- gnu/local.mk | 6 ++ gnu/packages/base.scm | 25 ++++++-- gnu/packages/gcc.scm | 6 ++ .../gcc-4.9-libsanitizer-mode-size.patch | 52 +++++++++++++++++ .../gcc-6-libsanitizer-mode-size.patch | 53 +++++++++++++++++ .../gcc-7-libsanitizer-mode-size.patch | 53 +++++++++++++++++ .../gcc-8-libsanitizer-mode-size.patch | 56 ++++++++++++++++++ .../gcc-9-libsanitizer-mode-size.patch | 58 +++++++++++++++++++ .../glibc-2.29-supported-locales.patch | 33 +++++++++++ .../patches/glibc-supported-locales.patch | 11 ++-- 10 files changed, 343 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/glibc-2.29-supported-locales.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3c080bcd6e..4784e338d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -886,6 +886,11 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ + %D%/packages/patches/gcc-4.9-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-8-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-9-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ %D%/packages/patches/gcc-4-compile-with-gcc-5.patch \ @@ -957,6 +962,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-2.29-git-updates.patch \ %D%/packages/patches/glibc-2.27-supported-locales.patch \ %D%/packages/patches/glibc-2.28-supported-locales.patch \ + %D%/packages/patches/glibc-2.29-supported-locales.patch \ %D%/packages/patches/glibc-supported-locales.patch \ %D%/packages/patches/glm-restore-install-target.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index a37b10153e..2f93bfd638 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -574,13 +574,13 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.30") + (version "2.31") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72")) + "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -592,7 +592,6 @@ the store.") #t)) (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.patch" - "glibc-CVE-2019-19126.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" @@ -824,6 +823,24 @@ with the Linux kernel.") ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) +(define-public glibc-2.30 + (package + (inherit glibc) + (version "2.30") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72")) + (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-CVE-2019-19126.patch" + "glibc-hidden-visibility-ldconfig.patch" + "glibc-versioned-locpath.patch" + "glibc-allow-kernel-2.6.32.patch" + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-2.29-supported-locales.patch")))))) + (define-public glibc-2.29 (package (inherit glibc) @@ -842,7 +859,7 @@ with the Linux kernel.") "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" - "glibc-supported-locales.patch")))))) + "glibc-2.29-supported-locales.patch")))))) (define-public glibc-2.28 (package diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 94f7e15382..2eaca38dfb 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -400,6 +400,7 @@ Go. It also includes runtime support libraries for these languages.") "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc")) (patches (search-patches "gcc-4.9-libsanitizer-fix.patch" "gcc-4.9-libsanitizer-ustat.patch" + "gcc-4.9-libsanitizer-mode-size.patch" "gcc-arm-bug-71399.patch" "gcc-asan-missing-include.patch" "gcc-libvtv-runpath.patch" @@ -439,6 +440,7 @@ Go. It also includes runtime support libraries for these languages.") "gcc-5.0-libvtv-runpath.patch" "gcc-5-source-date-epoch-1.patch" "gcc-5-source-date-epoch-2.patch" + "gcc-6-libsanitizer-mode-size.patch" "gcc-fix-texi2pod.patch")) (modules '((guix build utils))) (snippet @@ -471,6 +473,7 @@ Go. It also includes runtime support libraries for these languages.") (base32 "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby")) (patches (search-patches "gcc-strmov-store-file-names.patch" + "gcc-6-libsanitizer-mode-size.patch" "gcc-6-source-date-epoch-1.patch" "gcc-6-source-date-epoch-2.patch" "gcc-5.0-libvtv-runpath.patch")))) @@ -500,6 +503,7 @@ Go. It also includes runtime support libraries for these languages.") (base32 "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq")) (patches (search-patches "gcc-strmov-store-file-names.patch" + "gcc-7-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))) (description "GCC is the GNU Compiler Collection. It provides compiler front-ends @@ -518,6 +522,7 @@ It also includes runtime support libraries for these languages."))) (base32 "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4")) (patches (search-patches "gcc-8-strmov-store-file-names.patch" + "gcc-8-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))))) (define-public gcc-9 @@ -532,6 +537,7 @@ It also includes runtime support libraries for these languages."))) (base32 "01mj3yk7z49i49168hg2cg7qs4bsccrrnv7pjmbdlf8j2a7z0vpa")) (patches (search-patches "gcc-9-strmov-store-file-names.patch" + "gcc-9-libsanitizer-mode-size.patch" "gcc-9-asan-fix-limits-include.patch" "gcc-5.0-libvtv-runpath.patch")))))) diff --git a/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..7df22c21aa --- /dev/null +++ b/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch @@ -0,0 +1,52 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 196eb3b3c64..b588e07e5ab 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -928,7 +928,11 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); ++#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 + CHECK_SIZE_AND_OFFSET(ipc_perm, __seq); + + CHECK_TYPE_SIZE(shmid_ds); +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index aec950454b3..6d94fc65c28 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -154,20 +154,13 @@ namespace __sanitizer { + 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; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) diff --git a/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..005e3c4079 --- /dev/null +++ b/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch @@ -0,0 +1,53 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 069d8d557de..c49c28c6e07 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 + #endif +-#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 --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 304d04e3935..6dee89c97e1 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -207,20 +207,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __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; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + diff --git a/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..41b4a4cac6 --- /dev/null +++ b/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch @@ -0,0 +1,53 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 97eae3fc7bc..4089d4695e2 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1145,8 +1145,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + 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 --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index c139322839a..7c3c2d866e5 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,20 +211,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __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; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + diff --git a/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..e343034991 --- /dev/null +++ b/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch @@ -0,0 +1,56 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index a915d37cdfe..5c720b2e700 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1147,8 +1147,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + 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 --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 4d11d071776..eda75a7cd84 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -210,14 +210,8 @@ namespace __sanitizer { + 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; +@@ -228,8 +222,7 @@ namespace __sanitizer { + 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) + diff --git a/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..9e99a3d198 --- /dev/null +++ b/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch @@ -0,0 +1,58 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +This is a combination of these upstream revisions: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 6cd4a5bac8b..d823a12190c 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1156,8 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + 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 --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 73af92af1e8..6a673a7c995 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,26 +211,13 @@ namespace __sanitizer { + 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) diff --git a/gnu/packages/patches/glibc-2.29-supported-locales.patch b/gnu/packages/patches/glibc-2.29-supported-locales.patch new file mode 100644 index 0000000000..05865dc7be --- /dev/null +++ b/gnu/packages/patches/glibc-2.29-supported-locales.patch @@ -0,0 +1,33 @@ +This patch is taken from debian's glibc package (generate-supported.mk). +It install the localedata/SUPPORTED file of the glibc. This file lists +all the supported locales of the glibc. + +diff --git a/localedata/Makefile b/localedata/Makefile +index 65079f9eb8..14818f84e0 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -169,7 +169,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -380,6 +381,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) + INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) + \ No newline at end of file diff --git a/gnu/packages/patches/glibc-supported-locales.patch b/gnu/packages/patches/glibc-supported-locales.patch index 05865dc7be..28577c75c0 100644 --- a/gnu/packages/patches/glibc-supported-locales.patch +++ b/gnu/packages/patches/glibc-supported-locales.patch @@ -3,20 +3,19 @@ It install the localedata/SUPPORTED file of the glibc. This file lists all the supported locales of the glibc. diff --git a/localedata/Makefile b/localedata/Makefile -index 65079f9eb8..14818f84e0 100644 --- a/localedata/Makefile +++ b/localedata/Makefile -@@ -169,7 +169,8 @@ endif - # Files to install. +@@ -176,7 +176,8 @@ + else install-others := $(addprefix $(inst_i18ndir)/, \ $(addsuffix .gz, $(charmaps)) \ - $(locales)) + $(locales)) \ + $(inst_i18ndir)/SUPPORTED + endif tests: $(objdir)/iconvdata/gconv-modules - -@@ -380,6 +381,14 @@ endif +@@ -401,6 +402,14 @@ include SUPPORTED @@ -30,4 +29,4 @@ index 65079f9eb8..14818f84e0 100644 + INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) - \ No newline at end of file +