From 76667036ecb84d299424d0cba345b83040e869ae Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 25 Apr 2017 23:52:53 -0400 Subject: gmp 6: Fix for cross --- pkgs/development/libraries/gmp/6.x.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index e30c15e629ef..92dd602fc4d8 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, m4, cxx ? true, withStatic ? false }: +{ stdenv, fetchurl, m4, cxx ? true +, buildPackages +, buildPlatform, hostPlatform +, withStatic ? false }: let inherit (stdenv.lib) optional optionalString; in @@ -16,7 +19,8 @@ let self = stdenv.mkDerivation rec { outputs = [ "out" "dev" "info" ]; passthru.static = self.out; - nativeBuildInputs = [ m4 ]; + nativeBuildInputs = [ m4 ] + ++ stdenv.lib.optional (buildPlatform != hostPlatform) buildPackages.stdenv.cc; configureFlags = # Build a "fat binary", with routines for several sub-architectures @@ -39,7 +43,7 @@ let self = stdenv.mkDerivation rec { configureFlagsArray+=("--build=$(./configfsf.guess)") ''; - doCheck = true; + doCheck = buildPlatform == hostPlatform; dontDisableStatic = withStatic; -- cgit 1.4.1 From 8ad2c6a830784bdc37a04f349ec5f13a1b16edee Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 25 Apr 2017 23:52:29 -0400 Subject: ncurses: Fix for cross --- pkgs/development/libraries/ncurses/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 4ffaee9be5ab..9e7f2eef46bf 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -5,6 +5,9 @@ , unicode ? true , gpm + +, buildPlatform, hostPlatform +, buildPackages }: let version = if abiVersion == "5" then "5.9" else "6.0"; @@ -35,7 +38,11 @@ stdenv.mkDerivation rec { # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ + pkgconfig + ] ++ lib.optionals (buildPlatform != hostPlatform) [ + buildPackages.ncurses buildPackages.stdenv.cc + ]; buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; preConfigure = '' @@ -58,7 +65,8 @@ stdenv.mkDerivation rec { sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure ''; - selfNativeBuildInput = true; + # Here only for native hash, remove on next mass rebuild + selfNativeBuildInput = buildPlatform == hostPlatform; enableParallelBuilding = true; -- cgit 1.4.1 From 2601a80639ecee27fdb83ce099c037a348ba7125 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 17 May 2017 16:07:04 -0400 Subject: release-cross: Make tests more uniform Fewer packages are only built on one platform. Eventually we should have each package encode its own requirements on build host and target (as we do for build already) and use that to test automatically. --- pkgs/top-level/release-cross.nix | 63 +++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 861b3abe1ad8..31ce31a67595 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -12,31 +12,29 @@ with import ./release-lib.nix { inherit supportedSystems scrubJobs; }; let nativePlatforms = linux; - /* Basic list of packages to cross-build */ - basicCrossDrv = { - bison = nativePlatforms; - busybox = nativePlatforms; - coreutils = nativePlatforms; - dropbear = nativePlatforms; + common = { + buildPackages.binutils = nativePlatforms; + gmp = nativePlatforms; }; - /* Basic list of packages to be natively built, - but need a crossSystem defined to get meaning */ - basicNativeDrv = { - buildPackages.binutils = nativePlatforms; + gnuCommon = common // { buildPackages.gccCrossStageFinal = nativePlatforms; - buildPackages.gdbCross = nativePlatforms; + coreutils = nativePlatforms; }; - basic = basicCrossDrv // basicNativeDrv; + linuxCommon = gnuCommon // { + buildPackages.gdbCross = nativePlatforms; - windows = { - buildPackages.binutils = nativePlatforms; - buildPackages.gccCrossStageFinal = nativePlatforms; + bison = nativePlatforms; + busybox = nativePlatforms; + dropbear = nativePlatforms; + ed = nativePlatforms; + ncurses = nativePlatforms; + patch = nativePlatforms; + }; - coreutils = nativePlatforms; + windowsCommon = gnuCommon // { boehmgc = nativePlatforms; - gmp = nativePlatforms; guile_1_8 = nativePlatforms; libffi = nativePlatforms; libtool = nativePlatforms; @@ -44,6 +42,10 @@ let windows.wxMSW = nativePlatforms; }; + darwinCommon = { + buildPackages.binutils = darwin; + }; + in { @@ -92,9 +94,7 @@ in arch = "arm64"; libc = "libSystem"; }; - in mapTestOnCross crossSystem { - buildPackages.binutils = darwin; - }; + in mapTestOnCross crossSystem darwinCommon; darwinToArm = let crossSystem = { @@ -102,9 +102,7 @@ in arch = "armv7-a"; libc = "libSystem"; }; - in mapTestOnCross crossSystem { - buildPackages.binutils = darwin; - }; + in mapTestOnCross crossSystem darwinCommon; /* Test some cross builds to the Sheevaplug */ crossSheevaplugLinux = let @@ -118,7 +116,7 @@ in libc = "glibc"; openssl.system = "linux-generic32"; }; - in mapTestOnCross crossSystem (basic // { + in mapTestOnCross crossSystem (linuxCommon // { ubootSheevaplug = nativePlatforms; }); @@ -131,7 +129,7 @@ in libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem windows; + in mapTestOnCross crossSystem windowsCommon; /* Test some cross builds on 64 bit mingw-w64 */ @@ -143,7 +141,7 @@ in libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem windows; + in mapTestOnCross crossSystem windowsCommon; /* Linux on the fuloong */ @@ -162,11 +160,7 @@ in abi = "n32"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; - }; + in mapTestOnCross crossSystem linuxCommon; /* Linux on Raspberrypi */ @@ -188,10 +182,7 @@ in abi = "aapcs-linux"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; + in mapTestOnCross crossSystem (linuxCommon // { vim = nativePlatforms; unzip = nativePlatforms; ddrescue = nativePlatforms; @@ -199,7 +190,7 @@ in patchelf = nativePlatforms; buildPackages.binutils = nativePlatforms; mpg123 = nativePlatforms; - }; + }); /* Cross-built bootstrap tools for every supported platform */ -- cgit 1.4.1