diff options
author | John Ericson <Ericson2314@yahoo.com> | 2017-06-28 21:39:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 21:39:16 -0400 |
commit | e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da (patch) | |
tree | 9ee09b5bb752ff52f38d0d4dc19572d4b7fc0c68 /pkgs/build-support | |
parent | 425e9ce493218acc5dd001cf7656e45f73b82596 (diff) | |
parent | 9f156f4a8a945dee1beeb49f6c2acb395c0af9c8 (diff) | |
download | nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar.gz nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar.bz2 nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar.lz nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar.xz nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.tar.zst nixlib-e1faeb574ae6f0946cdd8a3b32a5907e1d8e29da.zip |
Merge pull request #26884 from obsidiansystems/purge-stdenv-cross
Purge stdenv cross
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper-old/default.nix | 26 | ||||
-rw-r--r-- | pkgs/build-support/kernel/make-initrd.nix | 12 |
3 files changed, 22 insertions, 18 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 0c624a1454a3..ad6f6832298a 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -71,7 +71,7 @@ let '' + stdenv.lib.optionalString (textFile == ./setup-hook.sh) '' cat << 'EOF' >> $out - for CMD in ar as nm objcopy ranlib strip strings size ld + for CMD in ar as nm objcopy ranlib strip strings size ld windres do # which is not part of stdenv, but compgen will do for now if diff --git a/pkgs/build-support/gcc-wrapper-old/default.nix b/pkgs/build-support/gcc-wrapper-old/default.nix index f8a7c62edc73..a37d94c36e06 100644 --- a/pkgs/build-support/gcc-wrapper-old/default.nix +++ b/pkgs/build-support/gcc-wrapper-old/default.nix @@ -8,6 +8,7 @@ { name ? "", stdenv, lib, nativeTools, nativeLibc, nativePrefix ? "" , gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "" , zlib ? null +, hostPlatform, targetPlatform }: assert nativeTools -> nativePrefix != ""; @@ -69,9 +70,9 @@ stdenv.mkDerivation { # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I # do this sufficient if/else. dynamicLinker = - (if stdenv.cross.arch == "arm" then "ld-linux.so.3" else - if stdenv.cross.arch == "mips" then "ld.so.1" else - if stdenv.lib.hasSuffix "pc-gnu" stdenv.cross.config then "ld.so.1" else + (if hostPlatform.arch == "arm" then "ld-linux.so.3" else + if hostPlatform.arch == "mips" then "ld.so.1" else + if stdenv.lib.hasSuffix "pc-gnu" hostPlatform.config then "ld.so.1" else abort "don't know the name of the dynamic linker for this platform"); }; @@ -85,15 +86,20 @@ stdenv.mkDerivation { + " (wrapper script)"; }; - # The dynamic linker has different names on different Linux platforms. + # The dynamic linker has different names on different platforms. dynamicLinker = if !nativeLibc then - (if stdenv.system == "i686-linux" then "ld-linux.so.2" else - if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else + (if targetPlatform.system == "i686-linux" then "ld-linux.so.2" else + if targetPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else # ARM with a wildcard, which can be "" or "-armhf". - if stdenv.isArm then "ld-linux*.so.3" else - if stdenv.system == "powerpc-linux" then "ld.so.1" else - if stdenv.system == "mips64el-linux" then "ld.so.1" else - abort "don't know the name of the dynamic linker for this platform") + if targetPlatform.isArm32 then "ld-linux*.so.3" else + if targetPlatform.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else + if targetPlatform.system == "powerpc-linux" then "ld.so.1" else + if targetPlatform.system == "mips64el-linux" then "ld.so.1" else + if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld" else + if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else + builtins.trace + "Don't know the name of the dynamic linker for platform ${targetPlatform.config}, so guessing instead." + null) else ""; } diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 092ab4586b38..70727f9b49dc 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -12,7 +12,9 @@ # `contents = {object = ...; symlink = /init;}' is a typical # argument. -{ stdenv, perl, cpio, contents, ubootChooser, compressor, prepend }: +{ stdenv, perl, cpio, contents, ubootChooser, compressor, prepend +, hostPlatform +}: let inputsFun = ubootName : [ perl cpio ] @@ -22,9 +24,9 @@ in stdenv.mkDerivation { name = "initrd"; builder = ./make-initrd.sh; - nativeBuildInputs = inputsFun stdenv.platform.uboot; + nativeBuildInputs = inputsFun hostPlatform.platform.uboot; - makeUInitrd = makeUInitrdFun stdenv.platform.uboot; + makeUInitrd = makeUInitrdFun hostPlatform.platform.uboot; # !!! should use XML. objects = map (x: x.object) contents; @@ -36,9 +38,5 @@ stdenv.mkDerivation { map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents; pathsFromGraph = ./paths-from-graph.pl; - crossAttrs = { - nativeBuildInputs = inputsFun stdenv.cross.platform.uboot; - makeUInitrd = makeUInitrdFun stdenv.cross.platform.uboot; - }; inherit compressor prepend; } |