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
base: f2d1aa05de4d
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 75441dd64ac0
Choose a head ref
  • 4 commits
  • 12 files changed
  • 2 contributors

Commits on Apr 24, 2017

  1. top-level: stdenv.cross is now only defined with host != build

    In practice, this is a strictly stronger condition than target != build
    as we never have build = target != host. Really, the attribute should
    be removed altogether, but for now we make it work for plain libraries,
    which do not care about the target platform. In the few cases where the
    compilers use this and actually care about the target platform, I'll
    manually change them to use `targetPlatform` instead.
    Ericson2314 committed Apr 24, 2017
    Configuration menu
    Copy the full SHA
    a7d8913 View commit details
    Browse the repository at this point in the history
  2. Rewrite a few stdenv.cross uses that *should* be targetPlatform

    The previous commit redefines `stdenv.cross` for the sake of normal
    libaries, the most common use-case of that attribute. Some compilers
    however relied on the old definition so we have them use
    `targetPlatform` instead. This special casing is fine because we
    eventually want to remove `stdenv.cross` and use either `hostPlatform`
    or `targetPlatform` instead.
    Ericson2314 committed Apr 24, 2017
    Configuration menu
    Copy the full SHA
    a7068ac View commit details
    Browse the repository at this point in the history
  3. cross-stdenv: Only prune most overrides in the final stage

    Before all overrides were also pruned in the previous stage, now
    only gcc and binutils are, because they alone care about about the
    target platform. The rest of the overrides don't, so it's better to
    preserve them in order to avoid spurious rebuilds.
    Ericson2314 committed Apr 24, 2017
    Configuration menu
    Copy the full SHA
    49c99b7 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #25194 from obsidiansystems/host-target-unconfuse

    stdenv.cross is a silly attribute that needs to go leaving the well-defined hostPlatform and targetPlatform. This PR doesn't remove it, but changes its definition: before it tracked the target platform which is sometimes more useful for compilers, and now it tracks the host platform which is more useful for everything else. Most usages are libraries, falling in the "everything else" category, so changing the definition makes sense to appease the majority. The few compiler (gcc in particular) uses that exist I remove to use targetPlatform --- preserving correctness and becoming more explicit in the process.
    
    I would also update the documentation aside mentioning stdenv.cross as deprecated, but the definition given actually erroneously assumes this PR is already merged!
    Ericson2314 committed Apr 24, 2017
    Configuration menu
    Copy the full SHA
    75441dd View commit details
    Browse the repository at this point in the history