From a2a51f2ae356c139470da0573c9526c4a2aba96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 20 Jan 2010 19:13:18 +0000 Subject: [PATCH] Trying to make glibc211 build not only with the bootstrap-files compiler. svn path=/nixpkgs/branches/stdenv-updates/; revision=19581 --- pkgs/development/libraries/glibc-2.11/builder.sh | 4 +++- pkgs/development/libraries/glibc-2.11/default.nix | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/glibc-2.11/builder.sh b/pkgs/development/libraries/glibc-2.11/builder.sh index 1e5dd6294ea6..f8da3b8bbe2e 100644 --- a/pkgs/development/libraries/glibc-2.11/builder.sh +++ b/pkgs/development/libraries/glibc-2.11/builder.sh @@ -32,7 +32,9 @@ postInstall() { ln -s lib $out/lib64 fi - rm $out/lib/libgcc_s.so.1 + # This file, that should not remain in the glibc derivation, + # may have not been created during the preInstall + rm -f $out/lib/libgcc_s.so.1 } diff --git a/pkgs/development/libraries/glibc-2.11/default.nix b/pkgs/development/libraries/glibc-2.11/default.nix index a4ff10509ea7..9b4b4302a284 100644 --- a/pkgs/development/libraries/glibc-2.11/default.nix +++ b/pkgs/development/libraries/glibc-2.11/default.nix @@ -16,9 +16,18 @@ in builder = ./builder.sh; + # 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 = '' - ensureDir $out/lib - ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then + ensureDir $out/lib + ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + fi ''; meta.description = "The GNU C Library";