summary refs log tree commit diff
path: root/pkgs/stdenv/cross
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'upstream/master' into feature/js-unknown-ghcjsJohn Ericson2019-09-02
|\
| * Merge branch 'master' into update-ios-gnu-configMatthew Bauer2019-05-07
| |\
| | * gnu-config: bump to latest version for wasiMatthew Bauer2019-04-23
| | |
| | * wasm: init cross targetMatthew Bauer2019-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds pkgsCross.wasm32 and pkgsCross.wasm64. Use it to build Nixpkgs with a WebAssembly toolchain. stdenv/cross: use static overlay on isWasm isWasm doesn’t make sense dynamically linked.
| * | cross: use newer gnu-config on iOSMatthew Bauer2019-05-07
| |/
| * llvm8: support c++ in cross caseMatthew Bauer2019-04-11
| | | | | | | | | | | | | | | | | | | | this adds libc++ to the LLVM cross, giving us access to the full Nixpkgs set. This requires 4 stages of wrapped compilers: - Clang with no libraries - Clang with just compiler-rt - Clang with Libc, and compiler-rt - Clang with Libc++, Libc, and compiler-rt
| * androidndk: fixup messMatthew Bauer2019-04-10
| | | | | | | | | | | | | | New android ndk (18) now uses clang. We were going through the wrapper that are provided. This lead to surprising errors when building. Ideally we could use the llvm linker as well, but this leads to errors as many packages don’t support the llvm linker.
| * llvm: support cross compilation with useLLVM flagMatthew Bauer2019-02-26
| | | | | | | | | | | | | | | | | | | | | | | | You can build (partially) with LLVM toolchain using the useLLVM flag. This works like so: nix-build -A hello --arg crossSystem '{ system = "aarch64-unknown-linux-musl"; useLLVM = true }' also don’t separate debug info in lldClang It doesn’t work currently with that setup hook. Missing build-id?
* | Add support for `js-unknown-ghcjs`Moritz Angermann2019-09-02
|/ | | | This adds enough logic to nixpkgs to support the `js-unknown-ghcjs` triple.
* Merge branch 'master' into stagingJan Tojnar2018-12-25
|\
| * Separate androidndkpkgs from androidenvSander van der Burg2018-12-18
| |
* | treewide: remove paxutils from stdenvJörg Thalheim2018-12-22
| | | | | | | | | | | | | | More then one year ago we removed grsecurity kernels from nixpkgs: https://github.com/NixOS/nixpkgs/pull/25277 This removes now also paxutils from stdenv.
* | cctools: don’t depend on clang at runtimeMatthew Bauer2018-12-10
|/ | | | --disable-clang-as flag disables the use of clang by cctools-port
* stdenv: implement crossOverlaysMatthew Bauer2018-12-04
| | | | | | | | crossOverlays only apply to the packages being built, not the build packages. It is useful when you don’t care what is used to build your packages, just what is being built. The idea relies heavily on the cross compiling infrastructure. Using this implies that we need to create a cross stdenv.
* Revert "stdenv: partial revert of f2bb59e"John Ericson2018-09-26
| | | | This reverts commit 607063f61be3b19a2da054776b360d9c5b03038a.
* stdenv: partial revert of f2bb59eMatthew Bauer2018-09-26
| | | | | | | | | | | | | | | | | | /cc @Ericson2314 PR was https://github.com/NixOS/nixpkgs/pull/46857 This line broke MacOS cross compilation. paxctl cannot be built on macOS. Maybe it can be fixed, but no reason to break things unnecessarily. Regardless, you definitely need to be more careful about backporting. I think it’s fine to move fast and break things on master but with release-18.09 we should be more careful. Something like more automated testing for cross compilation would also be helpful (hopefully even making it block). (cherry picked from commit f9c4075873cb56464126f993d22a1a72f7cfac45)
* stdenv linux, stdenv cross: Harmonize extraNativeBuildInputsJohn Ericson2018-09-18
| | | | Want to make sure these are the same per host platform, without duplication.
* treewide: Remove usage of remaining redundant platform compatability stuffJohn Ericson2018-08-30
| | | | | Want to get this out of here for 18.09, so it can be deprecated thereafter.
* cross stdenv: Forget `allowedRequisites = nulll;` on inlineJohn Ericson2018-07-25
|
* makeStdenvCross: RemoveJohn Ericson2018-07-24
| | | | | It is inlined into the cross stdenv, which is its last use-case after the previous commit.
* android: add ndkVer to resolve ndk ambiguityMatthew Bauer2018-06-22
| | | | | | | | It wasn’t exactly clear which NDK you were using previously. This adds an attribute to system that handles what version of the NDK we should use when building things. /cc @Ericson2314
* android: Use NDK 17 for aarch32Matthew Bauer2018-06-22
|
* androidndk: Fix usage as crossSystemBastian Köcher2018-05-17
|
* ios-sdk-pkgs: Init from iOS SDK from XCodeKen Micklas2018-04-19
|
* cross stdenv: Make depsBuildBuild overrideable by config too.John Ericson2018-03-20
|
* prebuilt android tools: Init using SDKJohn Ericson2018-02-27
| | | | Expose as an option for the cross stdenv.
* all-packages: Remove gccCrossStageFinal; any gcc will not workJohn Ericson2017-09-21
|
* top-level: {build,host,target}Platform are defined in the stdenv insteadJohn Ericson2017-07-07
| | | | See #27069 for a discussion of this
* cross stdenv adaptor: Support --host --build --target across the boardJohn Ericson2017-06-22
| | | | | | | | 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
* cross stdenv adaptor: Remove `ccCross` `binutils` attrs and binutils extra ↵John Ericson2017-06-22
| | | | | | buildDepends It now has the correct wrapped tools and nothing else is needed.
* binutilsCross: Remove and use `binutils` instead alwaysJohn Ericson2017-04-25
| | | | | | | | | | | | | | | See previous commit for what was done to `binutils` to make this possible. There were some uses of `forcedNativePackages` added. The combination of overrides with that attribute is highly spooky: it's often important that if an overridden package comes from it, the replaced arguments for that package come from it. Long term this package set and all the spookiness should be gone and irrelevant: "Move along, nothing to see here!" No hashes should be changed with this commit
* cross-stdenv: Only prune most overrides in the final stageJohn Ericson2017-04-24
| | | | | | | 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.
* crossStdenv on iphone: Just get info from `targetPlatform`John Ericson2017-04-24
|
* cross stdenv: let build package's build deps resolve to native packagesJohn Ericson2017-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the "sliding window" principle: 0. Run packages: build = native; host = foreign; target = foreign; 1. Build packages: build = native; host = native; target = foreign; 2. Vanilla packages: build = native; host = native; target = native; 3. Vanilla packages: build = native; host = native; target = native; n+3. ... Each stage's build dependencies are resolved against the previous stage, and the "foreigns" are shifted accordingly. Vanilla packages alone are built against themsevles, since there are no more "foreign"s to shift away. Before, build packages' build dependencies were resolved against themselves: 0. Run packages: build = native; host = foreign; target = foreign; 1. Build packages: build = native; host = native; target = foreign; 2. Build packages: build = native; host = native; target = foreign; n+2. ... This is wrong because that principle is violated by the target platform staying foreign. This will change the hashes of many build packages and run packages, but that is OK. This is an unavoidable cost of fixing cross compiling. The cross compilation docs have been updated to reflect this fix.
* top-level: Lay the groundwork for `{build,host,target}Platform`John Ericson2017-01-24
| | | | | | | | | | | | The long term goal is a big replace: { inherit system platform; } => buildPlatform crossSystem => hostPlatform stdenv.cross => targetPlatform And additionally making sure each is defined even when not cross compiling. This commit refactors the bootstrapping code along that vision, but leaves the old identifiers with their null semantics in place so packages can be modernized incrementally.
* top-level: Introduce `buildPackages` for resolving build-time depsJohn Ericson2017-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [N.B., this package also applies to the commits that follow it in the same PR.] In most cases, buildPackages = pkgs so things work just as before. For cross compiling, however, buildPackages is resolved as the previous bootstrapping stage. This allows us to avoid the mkDerivation hacks cross compiling currently uses today. To avoid a massive refactor, callPackage will splice together both package sets. Again to avoid churn, it uses the old `nativeDrv` vs `crossDrv` to do so. So now, whether cross compiling or not, packages with get a `nativeDrv` and `crossDrv`---in the non-cross-compiling case they are simply the same derivation. This is good because it reduces the divergence between the cross and non-cross dataflow. See `pkgs/top-level/splice.nix` for a comment along the lines of the preceding paragraph, and the code that does this splicing. Also, `forceNativeDrv` is replaced with `forceNativePackages`. The latter resolves `pkgs` unless the host platform is different from the build platform, in which case it resolves to `buildPackages`. Note that the target platform is not important here---it will not prevent `forcedNativePackages` from resolving to `pkgs`. -------- Temporarily, we make preserve some dubious decisions in the name of preserving hashes: Most importantly, we don't distinguish between "host" and "target" in the autoconf sense. This leads to the proliferation of *Cross derivations currently used. What we ought to is resolve native deps of the cross "build packages" (build = host != target) package set against the "vanilla packages" (build = host = target) package set. Instead, "build packages" uses itself, with (informally) target != build in all cases. This is wrong because it violates the "sliding window" principle of bootstrapping stages that shifting the platform triple of one stage to the left coincides with the next stage's platform triple. Only because we don't explicitly distinguish between "host" and "target" does it appear that the "sliding window" principle is preserved--indeed it is over the reductionary "platform double" of just "build" and "host/target". Additionally, we build libc, libgcc, etc in the same stage as the compilers themselves, which is wrong because they are used at runtime, not build time. Fixing this is somewhat subtle, and the solution and problem will be better explained in the commit that does fix it. Commits after this will solve both these issues, at the expense of breaking cross hashes. Native hashes won't be broken, thankfully. -------- Did the temporary ugliness pan out? Of the packages that currently build in `release-cross.nix`, the only ones that have their hash changed are `*.gcc.crossDrv` and `bootstrapTools.*.coreutilsMinimal`. In both cases I think it doesn't matter. 1. GCC when doing a `build = host = target = foreign` build (maximally cross), still defines environment variables like `CPATH`[1] with packages. This seems assuredly wrong because whether gcc dynamically links those, or the programs built by gcc dynamically link those---I have no idea which case is reality---they should be foreign. Therefore, in all likelihood, I just made the gcc less broken. 2. Coreutils (ab)used the old cross-compiling infrastructure to depend on a native version of itself. When coreutils was overwritten to be built with fewer features, the native version it used would also be overwritten because the binding was tight. Now it uses the much looser `BuildPackages.coreutils` which is just fine as a richer build dep doesn't cause any problems and avoids a rebuild. So, in conclusion I'd say the conservatism payed off. Onward to actually raking the muck in the next PR! [1]: https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
* Add overlays mechanism to Nixpkgs.Nicolas B. Pierron2017-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add a new argument to Nixpkgs default expression named "overlays". By default, the value of the argument is either taken from the environment variable `NIXPKGS_OVERLAYS`, or from the directory `~/.nixpkgs/overlays/`. If the environment variable does not name a valid directory then this mechanism would fallback on the home directory. If the home directory does not exists it will fallback on an empty list of overlays. The overlays directory should contain the list of extra Nixpkgs stages which would be used to extend the content of Nixpkgs, with additional set of packages. The overlays, i-e directory, files, symbolic links are used in alphabetical order. The simplest overlay which extends Nixpkgs with nothing looks like: ```nix self: super: { } ``` More refined overlays can use `super` as the basis for building new packages, and `self` as a way to query the final result of the fix-point. An example of overlay which extends Nixpkgs with a small set of packages can be found at: https://github.com/nbp/nixpkgs-mozilla/blob/nixpkgs-overlay/moz-overlay.nix To use this file, checkout the repository and add a symbolic link to the `moz-overlay.nix` file in `~/.nixpkgs/overlays` directory.
* top-level: Do stdenvOverrides in stage.nix even if crossSystem exists.David Grayson2017-01-13
| | | | | Instead, the cross stdenv will patch up the override field -- the complexity is now confined to the one place it matters.
* top-level: Normalize stdenv bootingJohn Ericson2017-01-13
| | | | | | | | | | | Introduce new abstraction, `stdenv/booter.nix` for composing bootstraping stages, and use it everywhere for consistency. See that file for more doc. Stdenvs besides Linux and Darwin are completely refactored to utilize this. Those two, due to their size and complexity, are minimally edited for easier reviewing. No hashes should be changed.
* top-level: Close over fewer arguments for stdenv stagesJohn Ericson2016-11-30
| | | | | | | | This makes the flow of data easier to understand. There's little downside because the args in question are already inspected by the stdenvs. cross-compiling in particular is simpler because we don't need to worry about overriding the config closed over by `allPackages`.
* top-level: Remove cycles: stdenv calls in top-level but not vice versaJohn Ericson2016-11-30
| | | | | | | | | | | | | | | | | | | | | | | This commit changes the dependencies of stdenv, and clean-up the stdenv story by removing the `defaultStdenv` attribute as well as the `bootStdenv` parameter. Before, the final bootstrapping stage's stdenv was provided by all-packages, which was iterating multiple times over the top-level/default.nix expression, and non-final bootstrapping stages' stdenvs were explicitly specified with the `bootStdenv` parameter. Now, all stages' stdenvs are specified with the `stdenv` parameter. For non-final bootstrapping stages, this is a small change---basically just rename the parameter. For the final stage, top-level/default.nix takes the chosen stdenv and makes the final stage with it. `allPackages` is used to make all bootstrapping stages, final and non-final alike. It's basically the expression of `stage.nix` (along with a few partially-applied default arguments) Note, the make-bootstrap-tools scripts are temporarily broken
* Move up `inherit` binding for consistencyJohn Ericson2016-11-30
|
* top-level: Stop exposing all stdenvsJohn Ericson2016-11-30
|
* Add initial basic support for cross-compiling to iOSShea Levy2016-11-15
|
* top-level: Make cross compiling slightly sanerJohn Ericson2016-11-12
| | | | | Removes the weird stdenv cycle used to match the old infrastructure. It turns out that matching it so precisely is not needed.
* top-level: Make config-overriden stdenv bootstrap more normallyJohn Ericson2016-11-06
|
* top-level: Make stdenvCross which appears at first glance normal...John Ericson2016-11-06
...but actually is weird just like the original