From 371d2ddbf250b60f572ad3704a1b19311dcb7dea Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Oct 2006 11:06:44 +0000 Subject: [PATCH] * Back out r6830. svn path=/nixpkgs/trunk/; revision=6846 --- pkgs/development/libraries/glibc/builder.sh | 10 ++++++++++ pkgs/stdenv/linux/default.nix | 1 + pkgs/stdenv/linux/scripts/prehook.sh | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh index 9d34bda23bf..177e8482c90 100644 --- a/pkgs/development/libraries/glibc/builder.sh +++ b/pkgs/development/libraries/glibc/builder.sh @@ -35,6 +35,16 @@ preConfigure() { } +postConfigure=postConfigure +postConfigure() { + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= +} + + postInstall=postInstall postInstall() { if test -n "$installLocales"; then diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index cd2357df48f..e497acc9c25 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -100,6 +100,7 @@ rec { import ../generic { name = "stdenv-linux-boot"; + param1 = if staticGlibc then "static" else "dynamic"; preHook = ./scripts/prehook.sh; stdenv = stdenvInitial; shell = bootstrapTools.bash; diff --git a/pkgs/stdenv/linux/scripts/prehook.sh b/pkgs/stdenv/linux/scripts/prehook.sh index 29c02e2eaf2..4ba81f1eef7 100644 --- a/pkgs/stdenv/linux/scripts/prehook.sh +++ b/pkgs/stdenv/linux/scripts/prehook.sh @@ -1,3 +1,8 @@ export NIX_ENFORCE_PURITY=1 +if test "$param1" = "static"; then + export NIX_CFLAGS_LINK="-static" + export NIX_LDFLAGS_BEFORE="-static" +fi + havePatchELF=1