summary refs log tree commit diff
path: root/pkgs/stdenv/cross
Commit message (Collapse)AuthorAge
* pkgs: fix typosfigsoda2023-05-19
|
* pkgsLLVM.stdenv: use clangNoLibc when libc is nullAlyssa Ross2023-04-28
| | | | | clangNoLibc always uses LLVM bintools, so it still has the useLLVM semantics.
* stdenv/cross: remove now-redundant `file` nativeBuildInput on mingwAdam Joseph2022-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 97c43828fb7e016b4ee8fe434bc4d5e0b8a8b4be the `file` package has been part of stdenv, and no longer needs to be listed explicitly as a build input. Let's remove the platform-specific inclusion for mingw64 as suggested by @mehmooda: https://github.com/NixOS/nixpkgs/pull/168413#issuecomment-1147370500 I traced the line removed by this commit through the `git blame`; it was initially added in this commit (and then shuffled around a few dozen times by refactorings): https://github.com/NixOS/nixpkgs/commit/8b292a1b355e8e7f6e7a2cf439ab777bdae30422 The commit message indicates that `libpng-1.6.20` was current at the time. Although there are [libpng archives](https://github.com/glennrp/libpng) available in git form, the older versions don't have their autoconfery vendored in, so I can't link to them. Fortunately the relevant bit hasn't changed since then: https://github.com/glennrp/libpng/blob/a37d4836519517bdce6cb9d956092321eca3e73b/configure#L5575 ``` mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; ```
* llvmPackages_*: respect cc for target when choosing C++ flavoursternenseemann2022-01-07
| | | | | | | | | | | | | | | | | | | | llvmPackages_*.clang should check the default compiler for the package set it is targeting (targetPackages.stdenv.cc) instead of the compiler that has been used to build it (stdenv.cc) in order to get some sense of whether to use libc++ or libstdc++. Since we are now inspecting targetPackages in the llvmPackages.clang attribute, we need to avoid using it in the cross stdenv — which just forces us to explicitly request libcxxClang for darwin instead of relying on the clang attribute to pick it for us. We also need to do something similar for targetPackages.stdenv.cc: Here the llvmPackages.clang logic would work as we want (inspect targetPackages.stdenv.cc and if it doesn't exist, make the choice based on stdenv.cc), but it gets locked in a cycle with the previous package. We can easily break this, however: We know that the previous set had clang and the next one doesn't exist, so we'd choose libcxxClang any day of the week.
* pkgsStatic: Finally obviate overlay!John Ericson2021-08-20
|
* darwin cross: include CoreFoundation in stdenvAndrew Childs2021-05-17
|
* treewide: All the linker to be chosen independentlyJohn Ericson2021-05-14
| | | | | | | | This will begin the process of breaking up the `useLLVM` monolith. That is good in general, but I hope will be good for NetBSD and Darwin in particular. Co-authored-by: sterni <sternenseemann@systemli.org>
* llvmPackages: select version by targetPlatformEmery Hemingway2021-01-04
|
* Merge pull request #86223 from pikajude/darwin-static-evalSilvan Mosberger2020-09-30
|\ | | | | pkgsStatic: use clang for C compiler on Darwin
| * pkgsStatic: fix eval on DarwinJude Taylor2020-04-28
| |
* | gnu-config: 2019-04-15 -> 2020-05-04Emery Hemingway2020-08-02
| | | | | | | | | | | | Update gnu-config (config.sub, config.guess) to suport the Genode platform and apply the updateAutotoolsGnuConfigScriptsHook to Genode cross-compilation.
* | redox: add as targetAaron Janse2020-07-21
|/
* Fix lib testsJohn Ericson2019-11-26
| | | | js-ghcjs didn't fit in an existing categor.
* Add support for cross compiling to `js-ghcjs`John Ericson2019-11-25
| | | | | This platform doesn't have a C compiler, and so relies and the changes in the previous commit to work.
* 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