diff options
Diffstat (limited to 'pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix index f386ebbaf8e93..75a1512ff09ee 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix @@ -5,18 +5,19 @@ , bash , gnumake , gnupatch +, gnused , gnugrep , gnutar , gawk , bzip2 -, sed -, mesBootstrap ? false, tinycc ? null -, gcc ? null, glibc ? null, binutils ? null, linux-headers +, gcc +, glibc +, binutilsBoot +, linux-headers }: -assert mesBootstrap -> tinycc != null; -assert !mesBootstrap -> gcc != null && glibc != null && binutils != null; + let - pname = "binutils" + lib.optionalString mesBootstrap "-mes"; + pname = "binutils"; version = "2.20.1"; rev = "a"; @@ -60,15 +61,16 @@ bash.runCommand "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ - (if mesBootstrap then tinycc.compiler else gcc) + gcc gnumake gnupatch + gnused gnugrep gnutar gawk bzip2 - sed - ] ++ lib.optional (!mesBootstrap) binutils; + binutilsBoot + ]; passthru.tests.get-version = result: bash.runCommand "${pname}-get-version-${version}" {} '' @@ -95,17 +97,11 @@ bash.runCommand "${pname}-${version}" { ${lib.concatMapStringsSep "\n" (f: "patch -Np1 -i ${f}") patches} # Configure - ${if mesBootstrap then '' - export CC="tcc -B ${tinycc.libs}/lib -D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1" - export AR="tcc -ar" - '' else '' - export CC="gcc -B ${glibc}/lib -I${glibc}/include -I${linux-headers}/include" - export CPP="gcc -E -I${glibc}/include -I${linux-headers}/include" - export AR="ar" - export LIBRARY_PATH="${glibc}/lib" - export LIBS="-lc -lnss_files -lnss_dns -lresolv" - ''} - export SED=sed + export CC="gcc -B ${glibc}/lib -I${glibc}/include -I${linux-headers}/include" + export CPP="gcc -E -I${glibc}/include -I${linux-headers}/include" + export AR="ar" + export LIBRARY_PATH="${glibc}/lib" + export LIBS="-lc -lnss_files -lnss_dns -lresolv" bash ./configure ${lib.concatStringsSep " " configureFlags} # Build |