me
/
guix
Archived
1
0
Fork 0

gnu: glibc: Update to 2.31.

* 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.
master
Marius Bakke 2020-02-01 16:29:02 +01:00
parent a493a52646
commit a33eac038a
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
10 changed files with 343 additions and 10 deletions

View File

@ -883,6 +883,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 \
@ -954,6 +959,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 \

View File

@ -593,13 +593,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
@ -611,7 +611,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"
@ -843,6 +842,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)
@ -861,7 +878,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

View File

@ -402,6 +402,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"
@ -441,6 +442,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
@ -473,6 +475,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"))))
@ -492,6 +495,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
@ -510,6 +514,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
@ -524,6 +529,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"))))))

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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))

View File

@ -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))