svn path=/nixpkgs/trunk/; revision=826wip/yesman
parent
ab73ec398b
commit
a1b3ae0c81
@ -1,17 +1,17 @@ |
||||
#! /bin/sh |
||||
#! /bin/sh -e |
||||
|
||||
. $stdenv/setup || exit 1 |
||||
. $stdenv/setup |
||||
|
||||
tar xvfj $src || exit 1 |
||||
cd binutils-* || exit 1 |
||||
tar xvfj $src |
||||
cd binutils-* |
||||
|
||||
# Clear the default library search path. |
||||
if test "$noSysDirs" == "1"; then |
||||
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt || exit 1 |
||||
if test "$enforcePurity" = "1"; then |
||||
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt |
||||
fi |
||||
|
||||
./configure --prefix=$out || exit 1 |
||||
make || exit 1 |
||||
make install || exit 1 |
||||
./configure --prefix=$out |
||||
make |
||||
make install |
||||
|
||||
strip -S $out/lib/*.a || exit 1 |
||||
strip -S $out/lib/*.a |
||||
|
@ -1,13 +1,16 @@ |
||||
{system, glibc}: (import ../generic) { |
||||
name = "stdenv-linux-boot"; |
||||
system = system; |
||||
prehook = ./prehook-boot.sh; |
||||
posthook = ./posthook.sh; |
||||
{stdenv, glibc}: |
||||
|
||||
(import ../generic) { |
||||
name = "stdenv-nix-linux-boot"; |
||||
preHook = ./prehook-boot.sh; |
||||
initialPath = "/usr/local /usr /"; |
||||
param1 = ""; |
||||
param2 = ""; |
||||
param3 = ""; |
||||
param4 = glibc; |
||||
param5 = ""; |
||||
noSysDirs = true; |
||||
|
||||
inherit stdenv; |
||||
|
||||
gcc = (import ../../build-support/gcc-wrapper) { |
||||
name = "gcc-native"; |
||||
isNative = true; |
||||
nativePrefix = "/usr"; |
||||
inherit stdenv glibc; |
||||
}; |
||||
} |
||||
|
@ -1,13 +1,19 @@ |
||||
{bootStdenv, pkgs, glibc}: (import ../generic) { |
||||
{stdenv, glibc, pkgs}: |
||||
|
||||
(import ../generic) { |
||||
name = "stdenv-nix-linux"; |
||||
system = bootStdenv.system; |
||||
prehook = ./prehook.sh; |
||||
posthook = ./posthook.sh; |
||||
preHook = ./prehook.sh; |
||||
initialPath = (import ../nix/path.nix) {pkgs = pkgs;}; |
||||
|
||||
inherit stdenv; |
||||
|
||||
gcc = (import ../../build-support/gcc-wrapper) { |
||||
name = "gcc-native"; |
||||
isNative = false; |
||||
gcc = pkgs.gcc; |
||||
binutils = pkgs.binutils; |
||||
inherit stdenv glibc; |
||||
}; |
||||
|
||||
param1 = pkgs.bash; |
||||
param2 = pkgs.gcc; |
||||
param3 = pkgs.binutils; |
||||
param4 = glibc; |
||||
param5 = ""; |
||||
noSysDirs = true; |
||||
} |
||||
|
@ -1,18 +1,3 @@ |
||||
export SHELL=$param1 |
||||
|
||||
export NIX_CC=$param2/bin/gcc |
||||
export NIX_CXX=$param2/bin/g++ |
||||
export NIX_LD=$param3/bin/ld |
||||
|
||||
# The "-B$param4/lib" is a quick hack to force gcc to link against the |
||||
# crt1.o from our own glibc, rather than the one in /usr/lib. The |
||||
# real solution is of course to prevent those paths from being used by |
||||
# gcc in the first place. |
||||
# !!! -B should really be in NIX_CFLAGS_LINK, but ld-wrapper also uses |
||||
# that one (incorrectly?). |
||||
export NIX_CFLAGS_COMPILE="-B$param4/lib -isystem $param4/include $NIX_CFLAGS_COMPILE" |
||||
export NIX_CFLAGS_LINK="-L$param4/lib -L$param2/lib $NIX_CFLAGS_LINK" |
||||
export NIX_LDFLAGS="-dynamic-linker $param4/lib/ld-linux.so.2 -rpath $param4/lib -rpath $param2/lib $NIX_LDFLAGS" |
||||
|
||||
export NIX_LIBC_INCLUDES="$param4/include" |
||||
export NIX_LIBC_LIBS="$param4/lib" |
||||
export NIX_ENFORCE_PURITY=1 |
||||
|
Loading…
Reference in new issue