mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Merge pull request #29646 from obsidiansystems/stdenv-cross-adapter
stdenv cross adapter: Misc changes
This commit is contained in:
commit
fe2e7def53
@ -59,17 +59,18 @@ rec {
|
||||
makeStdenvCross = { stdenv
|
||||
, cc
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
, # Prior overrides are surely not valid as packages built
|
||||
# with this run on a different platform, so disable by
|
||||
# default.
|
||||
overrides ? _: _: {}
|
||||
} @ overrideArgs: let
|
||||
stdenv = overrideArgs.stdenv.override {
|
||||
inherit
|
||||
buildPlatform hostPlatform targetPlatform
|
||||
cc;
|
||||
cc overrides;
|
||||
|
||||
allowedRequisites = null;
|
||||
|
||||
# Overrides are surely not valid as packages built with this run on a
|
||||
# different platform.
|
||||
overrides = _: _: {};
|
||||
extraBuildInputs = [ ]; # Old ones run on wrong platform
|
||||
};
|
||||
in stdenv // {
|
||||
mkDerivation =
|
||||
@ -105,7 +106,7 @@ rec {
|
||||
# without proper `file` command, libtool sometimes fails
|
||||
# to recognize 64-bit DLLs
|
||||
++ stdenv.lib.optional (hostPlatform.config == "x86_64-w64-mingw32") pkgs.file
|
||||
++ stdenv.lib.optional (hostPlatform.config == "aarch64-linux-gnu") pkgs.updateAutotoolsGnuConfigScriptsHook
|
||||
++ stdenv.lib.optional hostPlatform.isAarch64 pkgs.updateAutotoolsGnuConfigScriptsHook
|
||||
;
|
||||
|
||||
# Cross-linking dynamic libraries, every buildInput should
|
||||
|
@ -219,7 +219,7 @@ in
|
||||
};
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
|
||||
@ -251,7 +251,7 @@ in
|
||||
};
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
# Construct the final stdenv. It uses the Glibc and GCC, and adds
|
||||
@ -281,7 +281,7 @@ in
|
||||
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional localSystem.isAarch64 prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
|
||||
cc = prevStage.gcc;
|
||||
|
||||
@ -312,7 +312,7 @@ in
|
||||
glibc.out glibc.dev glibc.bin/*propagated from .dev*/ linuxHeaders
|
||||
gcc gcc.cc gcc.cc.lib gcc.expand-response-params
|
||||
]
|
||||
++ lib.optionals (system == "aarch64-linux")
|
||||
++ lib.optionals localSystem.isAarch64
|
||||
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
|
||||
|
||||
overrides = self: super: {
|
||||
|
Loading…
Reference in New Issue
Block a user