From 319ebef3a361a914fc2e3b90bc9ff66ed8d2e107 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 26 Jan 2019 20:36:42 -0500 Subject: Revert "Merge pull request #36948 from dtzWill/fix/glibc-libgcc_s" This reverts commit 80ff19a45f40ddb3a3c55dbd929295fcb946eabb, reversing changes made to 43e867a226a8dc5c9c968aeae1c526697c71cd32. --- pkgs/development/libraries/glibc/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pkgs/development/libraries/glibc') diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index a5422b4c837..e46985d3fca 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -39,6 +39,22 @@ callPackage ./common.nix { inherit stdenv; } { # limit rebuilds by only disabling pie w/musl ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie"; + # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for + # any program we run, because the gcc will have been placed at a new + # store path than that determined when built (as a source for the + # bootstrap-tools tarball) + # Building from a proper gcc staying in the path where it was installed, + # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without + # any special hack. + preInstall = '' + if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then + mkdir -p $out/lib + cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + # the .so It used to be a symlink, but now it is a script + cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so + fi + ''; + postInstall = '' echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales -- cgit 1.4.1