3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

91 commits

Author SHA1 Message Date
John Ericson 22df9423cd release-cross: Cross compile from all 3 supported platforms 2018-10-23 23:20:48 -04:00
John Ericson 192f4144b2 release-lib: Filter supportedSystems with meta.platforms-style patterns
Instead of intersecting system strings, we filter with the sort of
patterns used in `meta.platforms`.

Indicating this change `forTheseSystems` has been renamed to
`forMatchingSystems`, since the given list is now patterns to match, and
not the systems themselves. [Just as with `meta.platforms`, systems
strings are also supported for backwards compatibility.]

This is more flexible, and makes the `forMatchingSystems` and
packagePlatforms` cases more analogous.
2018-03-19 21:32:28 -04:00
John Ericson 2482e2858e prebuilt android tools: Init using SDK
Expose as an option for the cross stdenv.
2018-02-27 14:15:39 -05:00
Will Dietz 6daf813b1c release-cross: add nix and nixUnstable
Essential software for every platform! :)

'nix' won't work for now,
but add it anyway so later this tests "stable" nix 2.
2018-02-22 08:56:05 -06:00
Will Dietz 76879b83ac release-cross: minor cleanup, add aarch64-musl 2018-02-22 08:33:27 -06:00
Will Dietz 9bc8127dc3 bootstrap-tools-cross, release-cross: add various musl entries 2018-02-13 09:44:56 -06:00
Will Dietz 7debd78f06 release-cross.nix: add entry for testing musl 2018-02-13 09:44:35 -06:00
John Ericson 13739e6b9e release-cross: Try building on Windows too 2018-01-22 11:29:15 -05:00
John Ericson b612597c3d release-cross: Add a test for Haskell on Raspberry Pi and "Android"
Hello World with ghcHEAD. ghc822 to come after some patches.

Android will be turned into real Android...later.
2018-01-21 23:31:04 -05:00
Tuomas Tynkkynen 82cab72dd4 release-lib: forAllSupportedSystems -> forTheseSystems
I'm going to move forAllSystems from nixos/release.nix, and these
functions sound too similar while doing different things.
2018-01-16 18:48:54 +02:00
Bojan Nikolic db475df127 mingw-w64-pthreads: The C compiler is needed
It was a copy and paste error from the headers derivation. Also test in
release-cross.
2018-01-02 19:01:18 -05:00
John Ericson ab651d2c9b linux bootstrap tools: Use same derivation whether cross compiling or not 2018-01-02 13:52:41 -05:00
John Ericson b9bf90ca6c all-packages: Remove gccCrossStageFinal; any gcc will not work 2017-09-21 15:49:18 -04:00
John Ericson 20e756a093 lib: Consolidate platform configurations (used for crossSystem)
This is good for maintenance and education.
2017-05-29 18:56:03 -04:00
John Ericson df081787ee release-cross: Be less absurd in ensureUnaffected tests
We need to at least used a valid 4-part LLVM target "triple" and
libc.
2017-05-23 01:44:27 -04:00
John Ericson c443033be3 gdb: Modernize and simplify derivation
- `isGNU` to `isHurd`, my sedding did not catch
 - Simplify cross compilation in general
 - Be more careful about python
 - no more `gdbCross` in all-packages
2017-05-22 17:10:29 -04:00
John Ericson 25edc476fd glibc: Simplify derivation further
No native hashes should be changed with this commit
default.nix's cross hash should also not be changed
2017-05-20 22:17:28 -04:00
John Ericson df91297181 release-cross: Do a recursive union to make sure we don't loose tests 2017-05-18 10:41:58 -04:00
John Ericson 2601a80639 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.
2017-05-17 18:54:31 -04:00
John Ericson d34079c2d9 release-cross: Add arms test from Darwin for binutils
This does a decent job of testing everything in this PR up to here.
2017-05-17 15:33:05 -04:00
John Ericson 371ebc89ca lib platform parsing: Fix windows support to conform to LLVM, take 2
Second attempt at pull request #25275

This reverts commit b70924bd80,
reapplying 2282a5774c
2017-05-17 11:16:00 -04:00
Vladimír Čunát b70924bd80
Revert "Merge pull request #25275 from Ericson2314/platform-normalize"
This reverts commit 2282a5774c, reversing
changes made to 14adea9156.

The lib tests are bloking nixpkgs-unstable, and I don't like debugging
it soon enough.
2017-05-06 13:28:07 +02:00
John Ericson 92887cb466 release-cross: Add final "-gnu" to fuloong triple 2017-04-27 14:46:32 -04:00
John Ericson fcde869e7e lib platform parsing: Fix windows
There is no more `cygwin` OS, but instead a `cygnus` abi. "win32"
and "mingw32" parse as `windows`. Add a 3-part hack because autotools
breaks on explicit abi with windows-like (e.g. "i686-pc-windows-gnu").

Also change cross triples to conform
2017-04-27 14:30:42 -04:00
John Ericson 5c91dc9bcf release-cross: Fix more typos---this is embarrising 2017-04-17 21:02:56 -04:00
John Ericson 9169f3c924 release-cross: Fix typo preventing evaluation 2017-04-17 20:22:37 -04:00
John Ericson 8c99aab3ea lib: Fix system parsing, and use for doubles lists
The old hard-coded lists are now used to test system parsing.

In the process, make an `assertTrue` in release lib for eval tests; also
use it in release-cross
2017-04-17 17:13:01 -04:00
John Ericson 2227789392 lib: Collect system/platform related files
Previously, platforms was a random thing in top-level
2017-04-17 17:13:01 -04:00
John Ericson b477851f34 top-level: Less indirection for lib in release*.nix 2017-04-17 17:13:01 -04:00
John Ericson 213d29f6b7 release-cross: For fuloong, just use the predefined platform
This is a semantic change, but probably a safe one. In any event, this is
very old hardware that probably no one uses anymore anyways.
2017-04-17 17:13:01 -04:00
John Ericson c869fe022e top-level: no more need to expose splicedPackages
This was just done temporarily on the last cross-overhauling PR for
testing purposes.
2017-01-25 09:24:55 -05:00
John Ericson bf17d6dacf top-level: Introduce buildPackages for resolving build-time deps
[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
2017-01-24 11:37:56 -05:00
John Ericson a62ee8d45c release-cross: Expose sub-jobs of linux cross stdenv 2017-01-15 14:19:39 -05:00
John Ericson fa0a12e35d release-cross: Use nativeDrv rather than relying on default
The default will soon change
2017-01-14 16:39:43 -05:00
John Ericson 427dbcb1d7 top-level: Add more options to release-cross.nix, normalize param comments 2017-01-14 14:25:56 -05:00
John Ericson 1d0e91831b release-cross: Test for unchanged native derivations
These derivations do not care about the target platform, and thus should
not be affected by cross-compiling. Currently, these tests *fail*, but they
will be fixed soon by a latter PR. The release-cross job doesn't block a
channel, so this should be no problem.
2016-12-29 08:53:18 -08:00
John Ericson db0dbd0b81 release-cross: Use the same genAttrs logic for testOnCross as testOn
Eventually we'll want to test cross-compiling *from* various platforms. For
now, its good to be consistent.
2016-12-27 15:41:07 -08:00
John Ericson 74753d01f8 release-cross: Reformat to be far more legible 2016-12-27 15:41:07 -08:00
Tuomas Tynkkynen cd645c417a release-cross.nix: Build the bootstrap tools for ARM 2016-07-20 02:38:10 +03:00
Tuomas Tynkkynen ee1a647bc2 release-cross.nix: Remove bunch of packages that don't build 2016-07-20 02:38:10 +03:00
Tuomas Tynkkynen d0e25d815c release-cross.nix: Drop any platforms not having a single working build 2016-07-20 02:38:10 +03:00
Eelco Dolstra 4232f5d219 Disable system_tarball_pc and fix eval
It refers to a kernel version that no longer exists.

(cherry picked from commit e4b9624ca8)
2015-07-22 12:27:15 +02:00
aszlig e64b342fa8
Use mingw-w64 for 32bit Windows builds as well.
Mingw(32) is rather poorly maintaned and has quite a lot of bugs. And
because our Windows cross builds were also poorly maintained and most of
the cross-tests were broken as well, I'm just taking this step and try
to switch to mingw-w64 for everything "cross Windows".

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-03 22:38:48 +01:00
Shea Levy 58246936e4 platforms.nix: Separate 32-bit and 64-bit PCs
With this, stdenv.platform.kernelArch can be used by the kernel builder
for PC platforms too.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-12-31 21:34:44 -05:00
Domen Kozar d31b8b2988 rpi: more packages to cross-compile 2013-05-26 12:54:26 +02:00
Domen Kozar 9229f669fc release-cross: add raspberrypi 2013-05-26 00:11:38 +02:00
Eelco Dolstra c5f45036e6 release-lib.nix: Make the set of supported platforms an argument 2013-03-26 13:12:25 +01:00
Eelco Dolstra 2aa6f262cb Merge remote-tracking branch 'origin/master' into stdenv-updates 2013-02-15 13:36:34 +01:00
Shea Levy af26af6fc7 Remove EOL'd Linux 3.6 2013-02-14 14:33:42 -05:00
Shea Levy c23084906b Remove EOL'd Linux 3.3 2013-02-14 14:30:31 -05:00