Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 64acaa1e2dcb
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: afec912d81e0
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on May 17, 2017

  1. gmp 6: Fix for cross

    Ericson2314 committed May 17, 2017
    Copy the full SHA
    7666703 View commit details
  2. ncurses: Fix for cross

    Ericson2314 committed May 17, 2017
    Copy the full SHA
    8ad2c6a View commit details
  3. 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.
    Ericson2314 committed May 17, 2017
    Copy the full SHA
    2601a80 View commit details
  4. Merge pull request #25867 from obsidiansystems/ghc-deps-cross

    Fix cross compilation of some GHC deps
    Ericson2314 authored May 17, 2017
    Copy the full SHA
    afec912 View commit details
Showing with 44 additions and 41 deletions.
  1. +7 −3 pkgs/development/libraries/gmp/6.x.nix
  2. +10 −2 pkgs/development/libraries/ncurses/default.nix
  3. +27 −36 pkgs/top-level/release-cross.nix
10 changes: 7 additions & 3 deletions pkgs/development/libraries/gmp/6.x.nix
Original file line number Diff line number Diff line change
@@ -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;

12 changes: 10 additions & 2 deletions pkgs/development/libraries/ncurses/default.nix
Original file line number Diff line number Diff line change
@@ -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;

63 changes: 27 additions & 36 deletions pkgs/top-level/release-cross.nix
Original file line number Diff line number Diff line change
@@ -12,38 +12,40 @@ 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;
libunistring = nativePlatforms;
windows.wxMSW = nativePlatforms;
};

darwinCommon = {
buildPackages.binutils = darwin;
};

in

{
@@ -92,19 +94,15 @@ in
arch = "arm64";
libc = "libSystem";
};
in mapTestOnCross crossSystem {
buildPackages.binutils = darwin;
};
in mapTestOnCross crossSystem darwinCommon;

darwinToArm = let
crossSystem = {
config = "arm-apple-darwin10";
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,18 +182,15 @@ in
abi = "aapcs-linux";
};
};
in mapTestOnCross crossSystem {
coreutils = nativePlatforms;
ed = nativePlatforms;
patch = nativePlatforms;
in mapTestOnCross crossSystem (linuxCommon // {
vim = nativePlatforms;
unzip = nativePlatforms;
ddrescue = nativePlatforms;
lynx = nativePlatforms;
patchelf = nativePlatforms;
buildPackages.binutils = nativePlatforms;
mpg123 = nativePlatforms;
};
});


/* Cross-built bootstrap tools for every supported platform */