diff options
Diffstat (limited to 'pkgs/top-level/all-packages.nix')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 91 |
1 files changed, 30 insertions, 61 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24e580134d775..b395d60353dfa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31,19 +31,6 @@ with pkgs; # it's just the plain stdenv. stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv); - stdenvNoCC = stdenv.override ( - { cc = null; hasCC = false; } - - // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && (stdenv.hostPlatform != stdenv.buildPlatform)) { - # TODO: This is a hack to use stdenvNoCC to produce a CF when cross - # compiling. It's not very sound. The cross stdenv has: - # extraBuildInputs = [ targetPackages.darwin.apple_sdks.frameworks.CoreFoundation ] - # and uses stdenvNoCC. In order to make this not infinitely recursive, we - # need to exclude this extraBuildInput. - extraBuildInputs = []; - } - ); - mkStdenvNoLibs = stdenv: let bintools = stdenv.cc.bintools.override { libc = null; @@ -61,7 +48,7 @@ with pkgs; }; stdenvNoLibs = - if stdenv.hostPlatform != stdenv.buildPlatform && (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.useLLVM or false) + if stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform then # We cannot touch binutils or cc themselves, because that will cause # infinite recursion. So instead, we just choose a libc based on the @@ -74,7 +61,17 @@ with pkgs; # thing to to create an earlier thing (leading to infinite recursion) and # we also would still respect the stage arguments choices for these # things. - overrideCC stdenv buildPackages.llvmPackages.clangNoCompilerRt + (if stdenvNoCC.hostPlatform.isDarwin || stdenvNoCC.hostPlatform.useLLVM or false + then overrideCC stdenvNoCC buildPackages.llvmPackages.clangNoCompilerRt + else gccCrossLibcStdenv) + else mkStdenvNoLibs stdenv; + + stdenvNoLibc = + if stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform + then + (if stdenvNoCC.hostPlatform.isDarwin || stdenvNoCC.hostPlatform.useLLVM or false + then overrideCC stdenvNoCC buildPackages.llvmPackages.clangNoLibc + else gccCrossLibcStdenv) else mkStdenvNoLibs stdenv; gccStdenvNoLibs = mkStdenvNoLibs gccStdenv; @@ -15466,11 +15463,6 @@ with pkgs; gccCrossLibcStdenv = overrideCC stdenvNoCC buildPackages.gccWithoutTargetLibc; - crossLibcStdenv = - if stdenv.hostPlatform.useLLVM or false || stdenv.hostPlatform.isDarwin - then overrideCC stdenv buildPackages.llvmPackages.clangNoLibc - else gccCrossLibcStdenv; - # The GCC used to build libc for the target platform. Normal gccs will be # built with, and use, that cross-compiled libc. gccWithoutTargetLibc = assert stdenv.targetPlatform != stdenv.hostPlatform; let @@ -17639,9 +17631,8 @@ with pkgs; h3 = h3_3; - avrlibc = callPackage ../development/misc/avr/libc { }; - avrlibcCross = callPackage ../development/misc/avr/libc { - stdenv = crossLibcStdenv; + avrlibc = callPackage ../development/misc/avr/libc { + stdenv = stdenvNoLibc; }; avr8burnomat = callPackage ../development/misc/avr8-burn-omat { }; @@ -17715,10 +17706,7 @@ with pkgs; msp430GccSupport = callPackage ../development/misc/msp430/gcc-support.nix { }; - msp430Newlib = callPackage ../development/misc/msp430/newlib.nix { }; - msp430NewlibCross = callPackage ../development/misc/msp430/newlib.nix { - newlib = newlibCross; - }; + msp430Newlib = callPackage ../development/misc/msp430/newlib.nix { }; mspds = callPackage ../development/misc/msp430/mspds { }; mspds-bin = callPackage ../development/misc/msp430/mspds/binary.nix { }; @@ -20933,14 +20921,14 @@ with pkgs; }; muslCross = musl.override { - stdenv = crossLibcStdenv; + stdenv = stdenvNoLibc; }; # These are used when buiding compiler-rt / libgcc, prior to building libc. preLibcCrossHeaders = let inherit (stdenv.targetPlatform) libc; in if stdenv.targetPlatform.isMinGW then targetPackages.windows.mingw_w64_headers or windows.mingw_w64_headers - else if libc == "nblibc" then targetPackages.netbsdCross.headers or netbsdCross.headers + else if libc == "nblibc" then targetPackages.netbsd.headers or netbsd.headers else if libc == "libSystem" && stdenv.targetPlatform.isAarch64 then targetPackages.darwin.LibsystemCross or darwin.LibsystemCross else null; @@ -20951,13 +20939,13 @@ with pkgs; /**/ if name == null then null else if name == "glibc" then targetPackages.glibcCross or glibcCross else if name == "bionic" then targetPackages.bionic or bionic - else if name == "uclibc" then targetPackages.uclibcCross or uclibcCross - else if name == "avrlibc" then targetPackages.avrlibcCross or avrlibcCross - else if name == "newlib" && stdenv.targetPlatform.isMsp430 then targetPackages.msp430NewlibCross or msp430NewlibCross + else if name == "uclibc" then targetPackages.uclibc or uclibc + else if name == "avrlibc" then targetPackages.avrlibc or avrlibc + else if name == "newlib" && stdenv.targetPlatform.isMsp430 then targetPackages.msp430Newlib or msp430Newlib else if name == "newlib" && stdenv.targetPlatform.isVc4 then targetPackages.vc4-newlib or vc4-newlib else if name == "newlib" && stdenv.targetPlatform.isOr1k then targetPackages.or1k-newlib or or1k-newlib - else if name == "newlib" then targetPackages.newlibCross or newlibCross - else if name == "newlib-nano" then targetPackages.newlib-nanoCross or newlib-nanoCross + else if name == "newlib" then targetPackages.newlib or newlib + else if name == "newlib-nano" then targetPackages.newlib-nano or newlib-nano else if name == "musl" then targetPackages.muslCross or muslCross else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 else if name == "ucrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 @@ -20965,9 +20953,9 @@ with pkgs; if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries else targetPackages.darwin.LibsystemCross or (throw "don't yet have a `targetPackages.darwin.LibsystemCross for ${stdenv.targetPlatform.config}`") - else if name == "fblibc" then targetPackages.freebsdCross.libc or freebsdCross.libc - else if name == "oblibc" then targetPackages.openbsdCross.libc or openbsdCross.libc - else if name == "nblibc" then targetPackages.netbsdCross.libc or netbsdCross.libc + else if name == "fblibc" then targetPackages.freebsd.libc or freebsd.libc + else if name == "oblibc" then targetPackages.openbsd.libc or openbsd.libc + else if name == "nblibc" then targetPackages.netbsd.libc or netbsd.libc else if name == "wasilibc" then targetPackages.wasilibc or wasilibc else if name == "relibc" then targetPackages.relibc or relibc else throw "Unknown libc ${name}"; @@ -20983,7 +20971,7 @@ with pkgs; }; wasilibc = callPackage ../development/libraries/wasilibc { - stdenv = crossLibcStdenv; + stdenv = stdenvNoLibc; }; relibc = callPackage ../development/libraries/relibc { }; @@ -27974,14 +27962,6 @@ with pkgs; buildBarebox bareboxTools; - uclibc-ng-cross = uclibc-ng.override { - stdenv = crossLibcStdenv; - }; - - # Aliases - uclibc = uclibc-ng; - uclibcCross = uclibc-ng-cross; - eudev = callPackage ../by-name/eu/eudev/package.nix { util-linux = util-linuxMinimal; }; @@ -40611,18 +40591,11 @@ with pkgs; name = "bsd-setup-hook"; } ../os-specific/bsd/setup-hook.sh; - inherit (callPackage ../os-specific/bsd/freebsd { }) - freebsd freebsdCross; + freebsd = callPackage ../os-specific/bsd/freebsd { }; netbsd = callPackage ../os-specific/bsd/netbsd { }; - netbsdCross = callPackage ../os-specific/bsd/netbsd { - stdenv = crossLibcStdenv; - }; openbsd = callPackage ../os-specific/bsd/openbsd { }; - openbsdCross = callPackage ../os-specific/bsd/openbsd { - stdenv = crossLibcStdenv; - }; powershell = callPackage ../shells/powershell { }; @@ -40646,18 +40619,14 @@ with pkgs; new-session-manager = callPackage ../applications/audio/new-session-manager { }; - newlib = callPackage ../development/misc/newlib { }; - newlibCross = callPackage ../development/misc/newlib { - stdenv = crossLibcStdenv; + newlib = callPackage ../development/misc/newlib { + stdenv = stdenvNoLibc; }; newlib-nano = callPackage ../development/misc/newlib { + stdenv = stdenvNoLibc; nanoizeNewlib = true; }; - newlib-nanoCross = callPackage ../development/misc/newlib { - nanoizeNewlib = true; - stdenv = crossLibcStdenv; - }; omnisharp-roslyn = callPackage ../development/tools/omnisharp-roslyn { }; |