Commit Graph

23 Commits

Author SHA1 Message Date
Alex Tunstall
eeeeb555e2 tests.cross.sanity: Add GHC to catch regressions
This is to ensure that Haskell users on platforms that lack official
bindists still have a convenient means of getting GHC running natively.

In my admittedly somewhat limited testing on RISC-V, GHC 8.10.7 is able
to bootstrap native builds for 9.2.8 and 9.4.5. GHC 9.2.8 and 9.4.5 are
unable to bootstrap themselves and 9.6.2 when cross-compiled.

If you're looking at this commit to see whether you can safely upgrade
the compiler used here to remove 8.10, please try cross-compiling 9.0 or
later and then booting a native GHC with it.
2024-09-08 23:50:05 +02:00
Sergei Trofimovich
9b5c93da36 tests.cross.sanity: fix eval by fixing qt5.qutebrowser reference
Without the change the eval fails as:

    $ nix build --no-link -f. tests.cross.sanity

       error: attribute 'qutebrowser' missing

       at pkgs/test/cross/default.nix:157:5:

          156|     # Two web browsers -- exercises almost the entire packageset
          157|     pkgs.pkgsCross.aarch64-multiplatform.qt5.qutebrowser
             |     ^
          158|     pkgs.pkgsCross.aarch64-multiplatform.firefox
2024-01-25 10:51:29 +00:00
Adam Joseph
7cb550b6fe tests.cross.sanity: add test case for #267859
This commit adds pkgs.spike, which internally uses
pkgsCross.riscv64-embedded.stdenv.cc, as a test case for the issue
reported in https://github.com/NixOS/nixpkgs/issues/267859
2023-11-16 20:01:40 -08:00
Adam Joseph
510397a8fe test.cross.sanity: add qt5.qutebrowser, firefox 2023-11-05 00:55:16 +00:00
Adam Joseph
72c279f477 lib.systems, test.cross.sanity: add test case for #264989
We have several cross-compilation bugs that show up if
hostPlatform!=buildPlatform yet
hostPlatform.config==buildPlatform.config.

These bugs have appeared and disappeared as we've fiddled with the
definition of equality for platform objects.  This commit adds a
clear-cut case where they are *not* equal and never will be, so we
can test it.
2023-11-04 05:57:34 +00:00
Artturin
70902269fd tests: fix eval failures 2023-11-04 00:52:15 +02:00
Adam Joseph
297a971a16
tests.cross.sanity: add pkgs.pkgsMusl.pkgsCross.gnu64.hello (#262876) 2023-11-03 06:29:09 +02:00
Adam Joseph
425cac96bf gcc: create dummy crtstuff on S390 as well
This commit replicates the fix in
https://github.com/NixOS/nixpkgs/pull/258032 for S390 as well.

Co-authored-by: Artturi <Artturin@artturin.com>
2023-10-25 08:36:22 +00:00
Adam Joseph
360dc254fe tests.cross.sanity: add armv5tel and armv6l 2023-08-15 19:11:09 -07:00
Adam Joseph
1912681314 tests.cross.sanity: enable mbuffer test
This test passes now.  Also fixes a minor oversight in the bug --
the test case needs to `touch $out` on success.
2023-08-14 15:09:06 -07:00
Adam Joseph
18c52d09bc libgcc: make needed architecture-specific targets if isArmv7 2023-08-14 15:08:59 -07:00
Adam Joseph
424952b7b4 gccWithoutTargetLibc: link libgcc_s.so using -mnewlib if isPower
Closes #244405

Also adds considerably more commenting to document what is going on.
2023-07-06 05:50:26 -07:00
Adam Joseph
895c24349c test.cross.sanity: add pkgs.pkgsCross.m68k.stdenv 2023-07-01 16:45:47 -07:00
Adam Joseph
fb26d16e99 test.cross.sanity: init
This commit adds `pkgs.test.cross.sanity`, which is meant to be a
carefully curated list of builds/packages that tend to break when
refactoring our cross-compilation infrastructure.

It should strike a balance between being small enough to fit in
a single eval (i.e. not so large that hydra-eval-jobs is needed)
so we can ask @ofborg to check it, yet should have good examples
of things that often break.  So, no buckshot `mapTestOnCross`
calls here.
2023-07-01 02:59:40 -07:00
Adam Joseph
18bbf33b38 test.cross.mbuffer: init
This adds a test case for the tricky issue encountered in

  https://github.com/NixOS/nixpkgs/issues/213453
2023-06-30 02:36:13 -07:00
Artturin
2eeb34c273 treewide: {build,host,target}Platform -> stdenv.{build,host,target}Platform 2023-01-09 21:13:22 +02:00
John Ericson
c71ab32a67 pkg-config-wrapper: Init
This fixes longstanding build issues
2020-05-16 00:21:21 +00:00
John Ericson
27edd9efb3 cross/tests: Use crossPkgs.runCommand so we have strictDeps 2020-05-16 00:21:21 +00:00
Matthew Bauer
9abff4af4f wasm: init cross target
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.
2019-04-23 21:48:57 -04:00
Matthew Bauer
8e25da0beb cross/tests: add llvm-based tests 2019-02-26 19:46:24 -05:00
Matthew Bauer
b86e62d30d llvm: support cross compilation with useLLVM flag
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?
2019-02-26 19:45:35 -05:00
Matthew Bauer
9c8fd41224 treewide: add emulator to platform
You can use stdenv.hostPlatform.emulator to get an executable that
runs cross-built binaries. This could be any emulator. For instance,
we use QEMU to emulate Linux targets and Wine to emulate Windows
targets. To work with qemu, we need to support custom targets.

I’ve reworked the cross tests in pkgs/test/cross to use this
functionality.

Also, I’ve used talloc to cross-execute with the emulator. There
appears to be a cross-execute for all waf builds. In the future, it
would be nice to set this for all waf builds.

Adds stdenv.hostPlatform.qemuArch attrbute to get the qemuArch for
each platform.
2018-11-29 19:15:30 -06:00
Matthew Bauer
b98b4eac71 tests: add some cross tests 2018-07-21 17:00:05 -04:00