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: c76f8d9c7ab0
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: afd2bdbad25d
Choose a head ref

Commits on Jun 22, 2017

  1. cc-wrapper: Remove stdenv.is* for targetPlatform.is*

    Modify bootstrapping stdenvs to make sure `targetPlatform` also passed.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    c4ba2e3 View commit details
  2. cc-wrapper: Learn about target prefixes

    This is first step towards getting rid of gcc-wrapper-cross
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    459f1c6 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    Josh-Cena Joshua Chen
    Copy the full SHA
    d70e726 View commit details
  4. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    04a3cad View commit details
  5. cc-wrapper: Salt environment variables with LLVM triples

    We now (on cross) require per-target flag interposition by putting the
    triple in the names of the relevant environment variables, e.g:
    
    export NIX_arm_unknown_linux_gnu_CFLAGS_COMPILE=...
    
    The wrapper also has a `infixSalt` attribute (and "_" prefixed and
    suffixed variants) to assist downstream packages.
    
    Note how that the dashes are replaced to keep the identifier valid.
    Using names like this allows us to keep the settings for different
    compilers seperate.
    
    I think it might be even better to use names like `NIX_{BUILD,HOST}...`
    using the platform's role rather than the platform itself, but this
    would be more work as the previous stages' tools would have to be re-
    wrapped to take on their new role. I therefore didn't do this for now,
    but that route should be thoroughly explored in the future.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    0f03833 View commit details
  6. cc-wrapper: Temporarily got to great lengths to avoid mass-rebuild

    Eventually we should avoid this "pre-wrapping" and just update those
    files in nixpkgs. This mass-rebuild change is best done along with
    those needed to reduce the disparity between native and cross (i.e.
    making native the "identity cross").
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    8a7433f View commit details
  7. Copy the full SHA
    121e7d9 View commit details
  8. cross stdenv adaptor: Remove ccCross binutils attrs and binutils …

    …extra buildDepends
    
    It now has the correct wrapped tools and nothing else is needed.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    9bfd03e View commit details
  9. cross stdenv adaptor: Support --host --build --target across the board

    Packages get --host and --target by default, but can explicitly request
    any subset to be passed as needed. See docs for more info.
    
    rustc: Avoid hash breakage by using the old (ignored)
    dontSetConfigureCross when not cross building
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    594d264 View commit details
  10. cross stdenv adaptor: Disable checkPhase by default

    Before gcc-cross-wrapper did this unconditionally
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    e0492d5 View commit details
  11. cc-wrapper: when cross building, wedge in setting AR, AS, and LD env …

    …vars to their cross building versions
    
    I think it's ok to export things which aren't wrapped. The cc-wrapper
    can be thought of as responsible for all of binutils and the c
    compiler, only wrapping those binaries which are necessary to
    interposition---as opposed to all binaries it thinks are relevaant.
    
    Conversely, adding the setup hook to the unwrapped compilers would be
    unforunate as hooks are ugly hacks and the compilers themselves take
    a long time to rebuild. Better to wholely separate "pure packages" from
    hacks.
    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    c1fb71b View commit details
  12. cc-wrapper: Make the cross compiler use a crossEnvHook

    This is a hack until stdenv's setup.hs gets overhauled
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    0aee847 View commit details
  13. cc-wrapper: Port over finding of dynamic linker from gcc-cross-wrapper

    At the next break, we can deduplicate and go for the best of both
    worlds.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    c2e2152 View commit details
  14. Copy the full SHA
    bb7067f View commit details
  15. mingw-w64: Depend on own headers derivation

    Without this, a `#include <float.h>` resolves incorrectly. Either the
    headers weren't on the include path at all, or they only were for
    local, not system, imports.
    
    What's weird is this used to not be a problem. Not sure what other
    change in e.g. cc-wrapper would affect this.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    fc42ec0 View commit details
  16. Copy the full SHA
    f55ccbb View commit details
  17. podofo: Simplify derivation

    Bunch of junk for linux and cross compilation that's no longer needed
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    29c4d7f View commit details
  18. podofo: unsimplify derivation a bit to avoid hash breakage

    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    d016637 View commit details
  19. Copy the full SHA
    12795a7 View commit details
  20. Copy the full SHA
    38b2bd2 View commit details
  21. zlib: don't really override CC at ay point

    but leave the preConfigure script as it was when not cross building in order to avoid hash breakage
    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    f63f96a View commit details
  22. coreutils: Modernize and fix for cross

    "--host=..." needs to be passed but crossAttrs overrides that.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    167b80b View commit details
  23. Copy the full SHA
    8b22e49 View commit details
  24. Copy the full SHA
    05b3c87 View commit details
  25. 6
    Copy the full SHA
    7bdacad View commit details
  26. gnu patch: Fix for cross

    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    ef0b07e View commit details
  27. Copy the full SHA
    f75ad79 View commit details
  28. mpfs: Fix for cross by disabling check

    check phase is now only disabled by *default* for cross, but mpfr
    was forcing it always.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    c54c3cb View commit details
  29. Copy the full SHA
    2e337fe View commit details
  30. Copy the full SHA
    af8d1a4 View commit details
  31. libsigsegv: Fix for cross by disabling check

    Check phase is now only disabled *by default* for cross, but this
    package was forcing it unconditionally.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    b93e603 View commit details
  32. Copy the full SHA
    ff6ab1b View commit details
  33. libpmc: Fix for cross by disabling check

    Check phase is now only disabled *by default* for cross, but this
    package was forcing it unconditionally.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    5408962 View commit details
  34. findutils: modernize and fix cross

    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    d710c2d View commit details
  35. unzip: Fix for cross

    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    bef622a View commit details
  36. ddrescue: modernize and fix cross (hopefully)

    Carefully do not add attributes for cross unless in cross, to avoid hash breakage
    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    be3f18d View commit details
  37. lynx: Fix for cross

    Needed C toolchain targeting build platform
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    502902f View commit details
  38. mpg123: Modernize and fix for cross

    Do not even think about configureFlags unless in cross, to avoid hash
    breaking when not in cross.
    Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    7c754b1 View commit details
  39. gcc5: set --build and --host in the case where those differ and make …

    …sure to have a build cc-wrapper around as well
    Ross MacLeod authored and Ericson2314 committed Jun 22, 2017
    Copy the full SHA
    198dcec View commit details

Commits on Jun 23, 2017

  1. Merge pull request #26007 from obsidiansystems/cc-wrapper-prefix

    Get rid of gcc-cross-wrapper
    Ericson2314 authored Jun 23, 2017
    Copy the full SHA
    afd2bdb View commit details
Showing with 560 additions and 931 deletions.
  1. +10 −0 doc/stdenv.xml
  2. +6 −5 pkgs/applications/audio/mpg123/default.nix
  3. +8 −5 pkgs/applications/editors/ed/default.nix
  4. +18 −18 pkgs/applications/editors/vim/default.nix
  5. +6 −2 pkgs/applications/networking/browsers/lynx/default.nix
  6. +4 −2 pkgs/applications/video/mplayer/default.nix
  7. +1 −1 pkgs/applications/video/omxplayer/default.nix
  8. +161 −82 pkgs/build-support/cc-wrapper/default.nix
  9. +0 −5 pkgs/build-support/gcc-cross-wrapper/add-flags
  10. +0 −120 pkgs/build-support/gcc-cross-wrapper/builder.sh
  11. +0 −65 pkgs/build-support/gcc-cross-wrapper/default.nix
  12. +0 −117 pkgs/build-support/gcc-cross-wrapper/gcc-wrapper.sh
  13. +0 −145 pkgs/build-support/gcc-cross-wrapper/ld-wrapper.sh
  14. +0 −90 pkgs/build-support/gcc-cross-wrapper/setup-hook.sh
  15. +0 −24 pkgs/build-support/gcc-cross-wrapper/utils.sh
  16. +0 −1 pkgs/build-support/gcc-wrapper-old/default.nix
  17. +1 −1 pkgs/development/compilers/gcc/4.5/default.nix
  18. +1 −1 pkgs/development/compilers/gcc/4.8/default.nix
  19. +1 −1 pkgs/development/compilers/gcc/4.9/default.nix
  20. +5 −1 pkgs/development/compilers/gcc/5/default.nix
  21. +1 −1 pkgs/development/compilers/gcc/6/default.nix
  22. +1 −1 pkgs/development/compilers/gcc/snapshot/default.nix
  23. +9 −9 pkgs/development/compilers/ghc/head.nix
  24. +3 −1 pkgs/development/compilers/rust/rustc.nix
  25. +1 −1 pkgs/development/libraries/ffmpeg-full/default.nix
  26. +1 −1 pkgs/development/libraries/ffmpeg/generic.nix
  27. +1 −1 pkgs/development/libraries/libav/default.nix
  28. +11 −0 pkgs/development/libraries/libelf/cross-ar.patch
  29. +10 −7 pkgs/development/libraries/libelf/default.nix
  30. +6 −2 pkgs/development/libraries/libmpc/default.nix
  31. +4 −2 pkgs/development/libraries/libsigsegv/default.nix
  32. +1 −1 pkgs/development/libraries/libvpx/default.nix
  33. +1 −1 pkgs/development/libraries/libvpx/git.nix
  34. +6 −4 pkgs/development/libraries/mpfr/default.nix
  35. +6 −6 pkgs/development/libraries/pcre/default.nix
  36. +5 −9 pkgs/development/libraries/podofo/default.nix
  37. +1 −1 pkgs/development/libraries/qt-4.x/4.8/default.nix
  38. +9 −3 pkgs/development/libraries/zlib/default.nix
  39. +2 −1 pkgs/development/tools/misc/binutils/default.nix
  40. +9 −12 pkgs/os-specific/linux/busybox/default.nix
  41. +11 −0 pkgs/os-specific/windows/mingw-w64/common.nix
  42. +5 −34 pkgs/os-specific/windows/mingw-w64/default.nix
  43. +13 −0 pkgs/os-specific/windows/mingw-w64/headers.nix
  44. +13 −0 pkgs/os-specific/windows/mingw-w64/pthreads.nix
  45. +21 −21 pkgs/shells/bash/4.4.nix
  46. +40 −16 pkgs/stdenv/adapters.nix
  47. +9 −9 pkgs/stdenv/cross/default.nix
  48. +4 −0 pkgs/stdenv/darwin/default.nix
  49. +2 −0 pkgs/stdenv/freebsd/default.nix
  50. +4 −0 pkgs/stdenv/linux/default.nix
  51. +0 −1 pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
  52. +2 −0 pkgs/stdenv/native/default.nix
  53. +2 −0 pkgs/stdenv/nix/default.nix
  54. +12 −0 pkgs/tools/archivers/unzip/cross-cc.patch
  55. +8 −4 pkgs/tools/archivers/unzip/default.nix
  56. +37 −39 pkgs/tools/misc/coreutils/default.nix
  57. +11 −8 pkgs/tools/misc/findutils/default.nix
  58. +3 −2 pkgs/tools/misc/xburst-tools/default.nix
  59. +0 −7 pkgs/tools/networking/dropbear/default.nix
  60. +12 −2 pkgs/tools/system/ddrescue/default.nix
  61. +8 −5 pkgs/tools/text/gnupatch/default.nix
  62. +33 −33 pkgs/top-level/all-packages.nix
10 changes: 10 additions & 0 deletions doc/stdenv.xml
Original file line number Diff line number Diff line change
@@ -640,6 +640,16 @@ script) if it exists.</para>
true.</para></listitem>
</varlistentry>

<varlistentry>
<term><varname>configurePlatforms</varname></term>
<listitem><para>
By default, when cross compiling, the configure script has <option>--build=...</option> and <option>--host=...</option> passed.
Packages can instead pass <literal>[ "build" "host" "target" ]</literal> or a subset to control exactly which platform flags are passed.
Compilers and other tools should use this to also pass the target platform, for example.
Note eventually these will be passed when in native builds too, to improve determinism: build-time guessing, as is done today, is a risk of impurity.
</para></listitem>
</varlistentry>

<varlistentry>
<term><varname>preConfigure</varname></term>
<listitem><para>Hook executed at the start of the configure
11 changes: 6 additions & 5 deletions pkgs/applications/audio/mpg123/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{stdenv, fetchurl, alsaLib }:
{ stdenv
, fetchurl, alsaLib
, buildPlatform, hostPlatform
}:

stdenv.mkDerivation rec {
name = "mpg123-1.23.8";
@@ -10,10 +13,8 @@ stdenv.mkDerivation rec {

buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;

crossAttrs = {
configureFlags = if stdenv.cross ? mpg123 then
"--with-cpu=${stdenv.cross.mpg123.cpu}" else "";
};
${if buildPlatform != hostPlatform then "configureFlags" else null} =
stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";

meta = {
description = "Fast console MPEG Audio Player and decoder library";
13 changes: 8 additions & 5 deletions pkgs/applications/editors/ed/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ fetchurl, stdenv }:
{ stdenv, fetchurl
, buildPlatform, hostPlatform
}:

stdenv.mkDerivation rec {
name = "ed-${version}";
@@ -28,11 +30,12 @@ stdenv.mkDerivation rec {
make: *** [check] Error 127

*/
doCheck = !stdenv.isDarwin;
doCheck = !(hostPlatform.isDarwin || hostPlatform != buildPlatform);

crossAttrs = {
compileFlags = [ "CC=${stdenv.cross.config}-gcc" ];
};
configureFlags = if hostPlatform == buildPlatform then null else [
"--exec-prefix=${stdenv.cc.prefix}"
"CC=${stdenv.cc.prefix}cc"
];

meta = {
description = "An implementation of the standard Unix editor";
36 changes: 18 additions & 18 deletions pkgs/applications/editors/vim/default.nix
Original file line number Diff line number Diff line change
@@ -6,7 +6,9 @@
sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c";
}
# apple frameworks
, Carbon, Cocoa }:
, Carbon, Cocoa
, buildPlatform, hostPlatform
}:

let
common = callPackage ./common.nix {};
@@ -17,12 +19,26 @@ stdenv.mkDerivation rec {
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;

buildInputs = [ ncurses pkgconfig ]
++ stdenv.lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ];
nativeBuildInputs = [ gettext ];

configureFlags = [
"--enable-multibyte"
"--enable-nls"
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
"vim_cv_toupper_broken=no"
"--with-tlib=ncurses"
"vim_cv_terminfo=yes"
"vim_cv_tty_group=tty"
"vim_cv_tty_mode=0660"
"vim_cv_getcwd_broken=no"
"vim_cv_stat_ignores_slash=yes"
"ac_cv_sizeof_int=4"
"vim_cv_memmove_handles_overlap=yes"
"vim_cv_memmove_handles_overlap=yes"

# TODO(@Ericson2314): wont' be needed soon.
"STRIP=${hostPlatform.config}-strip"
];

postInstall = ''
@@ -31,22 +47,6 @@ stdenv.mkDerivation rec {
cp "${vimrc}" $out/share/vim/vimrc
'';

crossAttrs = {
configureFlags = [
"vim_cv_toupper_broken=no"
"--with-tlib=ncurses"
"vim_cv_terminfo=yes"
"vim_cv_tty_group=tty"
"vim_cv_tty_mode=0660"
"vim_cv_getcwd_broken=no"
"vim_cv_stat_ignores_slash=yes"
"ac_cv_sizeof_int=4"
"vim_cv_memmove_handles_overlap=yes"
"vim_cv_memmove_handles_overlap=yes"
"STRIP=${stdenv.cross.config}-strip"
];
};

__impureHostDeps = [ "/dev/ptmx" ];

# To fix the trouble in vim73, that it cannot cross-build with this patch
8 changes: 6 additions & 2 deletions pkgs/applications/networking/browsers/lynx/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ stdenv, fetchurl, ncurses, gzip, pkgconfig
{ stdenv, buildPackages
, fetchurl, pkgconfig, ncurses, gzip
, sslSupport ? true, openssl ? null
, buildPlatform, hostPlatform
}:

assert sslSupport -> openssl != null;
@@ -15,7 +17,9 @@ stdenv.mkDerivation rec {

configureFlags = [ "--enable-widec" ] ++ stdenv.lib.optional sslSupport "--with-ssl";

nativeBuildInputs = stdenv.lib.optional sslSupport pkgconfig;
nativeBuildInputs = stdenv.lib.optional sslSupport pkgconfig
++ stdenv.lib.optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc;

buildInputs = [ ncurses gzip ] ++ stdenv.lib.optional sslSupport openssl.dev;

meta = with stdenv.lib; {
6 changes: 4 additions & 2 deletions pkgs/applications/video/mplayer/default.nix
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@
, libjpegSupport ? true, libjpeg ? null
, useUnfreeCodecs ? false
, darwin ? null
, hostPlatform
}:

assert fontconfigSupport -> (fontconfig != null);
@@ -185,13 +186,14 @@ stdenv.mkDerivation rec {
'';

crossAttrs = {
dontSetConfigureCross = true;
configurePlatforms = [];
# Some things (vidix) are nanonote specific. Once someone cares, we can make options from them.
# Note, the `target` vs `host` confusion is intensional.
preConfigure = ''
configureFlags="`echo $configureFlags |
sed -e 's/--codecsdir[^ ]\+//' \
-e 's/--enable-runtime-cpudetection//' `"
configureFlags="$configureFlags --target=${stdenv.cross.arch}-linux
configureFlags="$configureFlags --target=${hostPlatform.arch}-linux
--enable-cross-compile --cc=$crossConfig-gcc --as=$crossConfig-as
--disable-vidix-pcidb --with-vidix-drivers=no --host-cc=gcc"
'';
2 changes: 1 addition & 1 deletion pkgs/applications/video/omxplayer/default.nix
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ let
enableParallelBuilding = true;

crossAttrs = {
dontSetConfigureCross = true;
configurePlatforms = [];
configureFlags = configureFlags ++ [
"--cross-prefix=${stdenv.cross.config}-"
"--enable-cross-compile"
Loading