diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glibc/common.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/common.nix | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glibc/common.nix b/nixpkgs/pkgs/development/libraries/glibc/common.nix index 7a83ffd36d74..888548d79f03 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/common.nix +++ b/nixpkgs/pkgs/development/libraries/glibc/common.nix @@ -32,7 +32,7 @@ , python3Minimal }: -{ name +{ pname , withLinuxHeaders ? false , profilingLibraries ? false , withGd ? false @@ -42,7 +42,7 @@ let version = "2.32"; - patchSuffix = "-40"; + patchSuffix = "-46"; sha256 = "0di848ibffrnwq7g2dvgqrnn4xqhj3h96csn69q4da51ymafl9qn"; in @@ -50,7 +50,7 @@ assert withLinuxHeaders -> linuxHeaders != null; assert withGd -> gd != null && libpng != null; stdenv.mkDerivation ({ - inherit version; + version = version + patchSuffix; linuxHeaders = if withLinuxHeaders then linuxHeaders else null; inherit (stdenv) is64bit; @@ -61,7 +61,7 @@ stdenv.mkDerivation ({ [ /* 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-40-g778b8d3786 + glibc-2.32-46-g1799ac8eab $ git show --minimal --reverse glibc-2.32.. | gzip -9n --rsyncable - > 2.32-master.patch.gz To compare the archive contents zdiff can be used. @@ -187,14 +187,13 @@ stdenv.mkDerivation ({ # bootstrap. BASH_SHELL = "/bin/sh"; + # Used by libgcc, elf-header, and others to determine ABI passthru = { inherit version; }; } // (removeAttrs args [ "withLinuxHeaders" "withGd" ]) // { - name = name + "-${version}${patchSuffix}"; - src = fetchurl { url = "mirror://gnu/glibc/glibc-${version}.tar.xz"; inherit sha256; @@ -227,6 +226,28 @@ stdenv.mkDerivation ({ libc_cv_c_cleanup=yes libc_cv_gnu89_inline=yes EOF + + # ./configure has logic like + # + # AR=`$CC -print-prog-name=ar` + # + # This searches various directories in the gcc and its wrapper. In nixpkgs, + # this returns the bare string "ar", which is build ar. This can result as + # a build failure with the following message: + # + # libc_pic.a: error adding symbols: archive has no index; run ranlib to add one + # + # (Observed cross compiling from aarch64-linux -> armv7l-linux). + # + # Nixpkgs passes a correct value for AR and friends, so to use the correct + # set of tools, we only need to delete this special handling. + sed -i \ + -e '/^AR=/d' \ + -e '/^AS=/d' \ + -e '/^LD=/d' \ + -e '/^OBJCOPY=/d' \ + -e '/^OBJDUMP=/d' \ + $configureScript ''; preBuild = lib.optionalString withGd "unset NIX_DONT_SET_RPATH"; |