mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Merge branch 'glibc-2.33' into staging
This commit is contained in:
commit
7c25c1fd88
@ -114,6 +114,18 @@ stdenv.mkDerivation rec {
|
||||
# This means `-accel hvf` is broken for now, on aarch64-darwin only.
|
||||
substituteInPlace meson.build \
|
||||
--replace 'if exe_sign' 'if false'
|
||||
|
||||
# glibc 2.33 compat fix: if `has_statx = true` is set, `tools/virtiofsd/passthrough_ll.c` will
|
||||
# rely on `stx_mnt_id`[1] which is not part of glibc's `statx`-struct definition.
|
||||
#
|
||||
# `has_statx` will be set to `true` if a simple C program which uses a few `statx`
|
||||
# consts & struct fields successfully compiles. It seems as this only builds on glibc-2.33
|
||||
# since most likely[2] and because of that, the problematic code-path will be used.
|
||||
#
|
||||
# [1] https://github.com/torvalds/linux/commit/fa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60#diff-64bab5a0a3fcb55e1a6ad77b1dfab89d2c9c71a770a07ecf44e6b82aae76a03a
|
||||
# [2] https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=io/bits/statx-generic.h;h=c34697e3c1fd79cddd60db294302e461ed8db6e2;hp=7a09e94be2abb92d2df612090c132e686a24d764;hb=88a2cf6c4bab6e94a65e9c0db8813709372e9180;hpb=c4e4b2e149705559d28b16a9b47ba2f6142d6a6c
|
||||
substituteInPlace meson.build \
|
||||
--replace 'has_statx = cc.links(statx_test)' 'has_statx = false'
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -4,6 +4,7 @@
|
||||
, llvmPackages
|
||||
, libxml2
|
||||
, zlib
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
let
|
||||
@ -20,6 +21,14 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-bILjcKX8jPl2n1HRYvYRb7jJkobwqmSJ+hHXSn9n2ag=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# glibc 2.33 support
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ziglang/zig/commit/0fee4b55a8c58791238efe6bf2da5ce3435a5cc1.patch";
|
||||
sha256 = "sha256-waVtolUlmGrfiRk4tWsSOij5MfUc+g57DatC6GtSx6c=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
llvmPackages.llvm.dev
|
||||
|
Binary file not shown.
BIN
pkgs/development/libraries/glibc/2.33-master.patch.gz
Normal file
BIN
pkgs/development/libraries/glibc/2.33-master.patch.gz
Normal file
Binary file not shown.
@ -41,9 +41,9 @@
|
||||
} @ args:
|
||||
|
||||
let
|
||||
version = "2.32";
|
||||
patchSuffix = "-48";
|
||||
sha256 = "0di848ibffrnwq7g2dvgqrnn4xqhj3h96csn69q4da51ymafl9qn";
|
||||
version = "2.33";
|
||||
patchSuffix = "-45";
|
||||
sha256 = "sha256-LiVWAA4QXb1X8Layoy/yzxc73k8Nhd/8z9i35RoGd/8=";
|
||||
in
|
||||
|
||||
assert withLinuxHeaders -> linuxHeaders != null;
|
||||
@ -60,14 +60,14 @@ stdenv.mkDerivation ({
|
||||
patches =
|
||||
[
|
||||
/* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping.
|
||||
$ git fetch --all -p && git checkout origin/release/2.32/master && git describe
|
||||
glibc-2.32-48-g16949aeaa0
|
||||
$ git show --minimal --reverse glibc-2.32.. | gzip -9n --rsyncable - > 2.32-master.patch.gz
|
||||
$ git fetch --all -p && git checkout origin/release/2.33/master && git describe
|
||||
glibc-2.33-45-g58b90461ae
|
||||
$ git show --minimal --reverse glibc-2.33.. | gzip -9n --rsyncable - > 2.33-master.patch.gz
|
||||
|
||||
To compare the archive contents zdiff can be used.
|
||||
$ zdiff -u 2.32-master.patch.gz ../nixpkgs/pkgs/development/libraries/glibc/2.32-master.patch.gz
|
||||
$ zdiff -u 2.33-master.patch.gz ../nixpkgs/pkgs/development/libraries/glibc/2.33-master.patch.gz
|
||||
*/
|
||||
./2.32-master.patch.gz
|
||||
./2.33-master.patch.gz
|
||||
|
||||
/* Allow NixOS and Nix to handle the locale-archive. */
|
||||
./nix-locale-archive.patch
|
||||
|
@ -1,19 +1,8 @@
|
||||
diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c
|
||||
--- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500
|
||||
+++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500
|
||||
@@ -51,7 +51,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef LD_SO_CONF
|
||||
-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
|
||||
+# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
|
||||
#endif
|
||||
|
||||
/* Get libc version number. */
|
||||
diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile
|
||||
--- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500
|
||||
+++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500
|
||||
@@ -559,13 +559,13 @@
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 5d666b1b..a5017e9c 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -669,14 +669,14 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
||||
|
||||
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
||||
|
||||
@ -26,16 +15,45 @@ diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile
|
||||
-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
||||
-CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
||||
-CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
||||
-CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
|
||||
+CFLAGS-dl-cache.c += $(PREFIX-FLAGS)
|
||||
+CFLAGS-cache.c += $(PREFIX-FLAGS)
|
||||
+CFLAGS-rtld.c += $(PREFIX-FLAGS)
|
||||
+CFLAGS-dl-usage.c += $(PREFIX-FLAGS) \
|
||||
-D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
|
||||
|
||||
cpp-srcs-left := $(all-rtld-routines:=.os)
|
||||
lib := rtld
|
||||
diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h
|
||||
--- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500
|
||||
+++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500
|
||||
@@ -28,7 +28,7 @@
|
||||
diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c
|
||||
index bef224b3..8e166b12 100644
|
||||
--- a/elf/dl-diagnostics.c
|
||||
+++ b/elf/dl-diagnostics.c
|
||||
@@ -205,7 +205,7 @@ print_paths (void)
|
||||
{
|
||||
_dl_diagnostics_print_labeled_string ("path.prefix", PREFIX);
|
||||
_dl_diagnostics_print_labeled_string ("path.rtld", RTLD);
|
||||
- _dl_diagnostics_print_labeled_string ("path.sysconfdir", SYSCONFDIR);
|
||||
+ _dl_diagnostics_print_labeled_string ("path.sysconfdir", PREFIX "/etc");
|
||||
|
||||
unsigned int index = 0;
|
||||
static const char *system_dirs = SYSTEM_DIRS "\0";
|
||||
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
|
||||
index 28ed637a..6f07b79a 100644
|
||||
--- a/elf/ldconfig.c
|
||||
+++ b/elf/ldconfig.c
|
||||
@@ -57,7 +57,7 @@
|
||||
#define TLS_HWCAP_BIT 63
|
||||
|
||||
#ifndef LD_SO_CONF
|
||||
-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
|
||||
+# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
|
||||
#endif
|
||||
|
||||
/* Get libc version number. */
|
||||
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
|
||||
index 964d50a4..2224d651 100644
|
||||
--- a/sysdeps/generic/dl-cache.h
|
||||
+++ b/sysdeps/generic/dl-cache.h
|
||||
@@ -35,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef LD_SO_CACHE
|
||||
|
@ -11,13 +11,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "proj";
|
||||
version = "7.2.1";
|
||||
version = "8.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OSGeo";
|
||||
repo = "PROJ";
|
||||
rev = version;
|
||||
sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9";
|
||||
sha256 = "sha256-pgmv/mtqpKbgU1RuKtue7NAnMyXR1BwGJwoeA/MTrpY=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString (version == "7.2.1") ''
|
||||
|
@ -23,6 +23,7 @@ stdenv.mkDerivation {
|
||||
./pselect.patch
|
||||
# Fix support for glibc 2.27's glob, inspired by http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html
|
||||
./glibc-2.27-glob.patch
|
||||
./glibc-2.33-glob.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals guileSupport [ pkg-config ];
|
||||
|
@ -0,0 +1,17 @@
|
||||
diff --git glob/glob.c glob/glob.c
|
||||
index 924f2b3..d4ef0c5 100644
|
||||
--- glob/glob.c
|
||||
+++ glob/glob.c
|
||||
@@ -212,8 +212,8 @@ my_realloc (p, n)
|
||||
# define __alloca alloca
|
||||
|
||||
|
||||
-#ifndef __GNU_LIBRARY__
|
||||
# define __stat stat
|
||||
+#ifndef __GNU_LIBRARY__
|
||||
# ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
# endif
|
||||
--
|
||||
2.31.1
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dmtcp";
|
||||
version = "2.6.0";
|
||||
version = "unstable-2021-03-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "01skyhr573w1dygvkwz66lvir2jsq443fjwkysglwxvmrdfz9kwd";
|
||||
rev = "f999adbb8e88fe452a0e57ceb43b6eed7b4409f9";
|
||||
sha256 = "sha256-codCHQui3fGfUZSNq8GuH4ad/GjD6I/S9rX83o8oFPc=";
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
@ -23,9 +23,9 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace configure \
|
||||
--replace '#define ELF_INTERPRETER "$interp"' \
|
||||
"#define ELF_INTERPRETER \"$(cat $NIX_CC/nix-support/dynamic-linker)\""
|
||||
substituteInPlace src/dmtcp_coordinator.cpp \
|
||||
substituteInPlace src/restartscript.cpp \
|
||||
--replace /bin/bash ${stdenv.shell}
|
||||
substituteInPlace util/gdb-add-symbol-file \
|
||||
substituteInPlace util/dmtcp_restart_wrapper.sh \
|
||||
--replace /bin/bash ${stdenv.shell}
|
||||
substituteInPlace test/autotest.py \
|
||||
--replace /bin/bash ${bash}/bin/bash \
|
||||
|
@ -1,11 +1,13 @@
|
||||
--- dmtcp-2.5.1-src/src/util_exec.cpp 2017-09-19 13:36:22.947587034 +0200
|
||||
+++ dmtcp-2.5.1-src/src/util_exec.cpp 2017-09-19 13:36:32.221313460 +0200
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
static string ld_linux_so_path(int version, bool is32bitElf = false)
|
||||
diff --git a/src/util_exec.cpp b/src/util_exec.cpp
|
||||
index 0e8a13c1..0cc99c1e 100644
|
||||
--- a/src/util_exec.cpp
|
||||
+++ b/src/util_exec.cpp
|
||||
@@ -300,7 +300,7 @@ Util::elfType(const char *pathname, bool *isElf, bool *is32bitElf)
|
||||
static string
|
||||
ld_linux_so_path(int version, bool is32bitElf = false)
|
||||
{
|
||||
- char buf[80];
|
||||
+ char buf[128];
|
||||
|
||||
#if (defined(__x86_64__) || defined(__aarch64__)) && !defined(CONFIG_M32)
|
||||
if (is32bitElf) {
|
||||
sprintf(buf, "/lib/ld-linux.so.%d", version);
|
||||
|
@ -258,6 +258,25 @@ in
|
||||
# Rewrap the binutils with the new glibc, so both the next
|
||||
# stage's wrappers use it.
|
||||
libc = getLibc self;
|
||||
|
||||
# Unfortunately, when building gcc in the next stage, its LTO plugin
|
||||
# would use the final libc but `ld` would use the bootstrap one,
|
||||
# and that can fail to load. Therefore we upgrade `ld` to use newer libc;
|
||||
# apparently the interpreter needs to match libc, too.
|
||||
bintools = self.stdenvNoCC.mkDerivation {
|
||||
inherit (prevStage.bintools.bintools) name;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
# We wouldn't need to *copy* all, but it's easier and the result is temporary anyway.
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/bin
|
||||
cp -a '${prevStage.bintools.bintools}'/bin/* "$out"/bin/
|
||||
chmod +w "$out"/bin/ld.bfd
|
||||
patchelf --set-interpreter '${getLibc self}'/lib/ld*.so.? \
|
||||
--set-rpath "${getLibc self}/lib:$(patchelf --print-rpath "$out"/bin/ld.bfd)" \
|
||||
"$out"/bin/ld.bfd
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
@ -21,6 +21,24 @@ stdenv.mkDerivation rec {
|
||||
# and are uninteresting as well as unimportant for our purposes (since NEWS never leaves the build env).
|
||||
excludes = [ "NEWS.md" ];
|
||||
})
|
||||
|
||||
# glibc 2.33 compat (https://github.com/dex4er/fakechroot/pull/85/)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dex4er/fakechroot/commit/534e6d555736b97211523970d378dfb0db2608e9.patch";
|
||||
sha256 = "sha256-bUlGJZvOSrATPt8bxGqU1UETTUD9V/HhJyA5ZxsOLQU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dex4er/fakechroot/commit/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch";
|
||||
sha256 = "sha256-vWN7zFkKlBd/F+h/66z21RiZqkSCn3UIzy9NHV7TYDg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dex4er/fakechroot/commit/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch";
|
||||
sha256 = "sha256-bFXsT0hWocJFbtS1cpzo7oIy/x66iUw6QE1/cEoZ+3k=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dex4er/fakechroot/commit/e7c1f3a446e594a4d0cce5f5d499c9439ce1d5c5.patch";
|
||||
sha256 = "sha256-eX6kB4U1ZlXoRtkSVEIBTRjO/cTS/7z5a9S366DiRMg=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
@ -9,7 +9,23 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700";
|
||||
};
|
||||
|
||||
patches = lib.optional stdenv.isLinux ./einval.patch
|
||||
patches = lib.optionals stdenv.isLinux [
|
||||
./einval.patch
|
||||
|
||||
# glibc 2.33 patches from ArchLinux
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-1.patch";
|
||||
sha256 = "sha256-F6BcxYInSLu7Fxg6OmMZDhTWoLqsc//yYPlTZqQQl68=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-2.patch";
|
||||
sha256 = "sha256-ifpJxhk6MyQpFolC1hIAAUjcHmOHVU1D25tRwpu2S/k=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-3.patch";
|
||||
sha256 = "sha256-o2Xm4C64Ny9TL8fjsZltjO1CdJ4VGwqZ+LnufVL5Sq8=";
|
||||
})
|
||||
]
|
||||
# patchset from brew
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
|
Loading…
Reference in New Issue
Block a user