Commit graph

151 commits

Author SHA1 Message Date
Wolfgang Walther 4949737a38
systems/examples: remove x86_64-unknown-redox
relibc itself has been removed in 2024 already.
2025-10-28 21:54:04 +01:00
OPNA2608 8448c28919 lib.systems.examples.ppc64-elfv1: Drop manual fix of rust.rustcTarget
ABI is now simplified automatically.
2025-10-11 20:57:29 +02:00
David McFarland 39fd8e4adf cygwin: init as a target toolchain
The old cygwin support used -pc-windows-cygnus as the config.  This is
supported by LLVM, but not by GNU. This will change it to -pc-cygwin,
which is more generally supported.

Because the kernel is now 'cygwin' rather than 'windows', isWindows will
return false. There are lots of different reasons isWindows is used in
nixpkgs, but in my experience they often have to do with posix
compatibility and don't apply to cygwin.

Co-authored-by: Brian McKenna <brian@brianmckenna.org>
2025-09-27 13:29:44 -03:00
Marie Ramlow b6d48619ed lib.systems: add ppc32 target 2025-09-10 08:15:07 +02:00
Emily 6e959288bb lib.systems.examples: bump Android SDK and NDK
Per <https://github.com/android/ndk/wiki>, NDK 26 is EOL.
2025-08-18 16:52:14 +01:00
Ross Smyth 4af7c6bdee lib.systems: Add examples & helpers for MSVC 2025-07-31 11:41:15 -04:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
OPNA2608 8c6307d19b lib.systems.examples: Add rust.rustcTarget for ppc64-elfv1 2025-07-05 22:16:59 +02:00
OPNA2608 f5d07900bf lib.systems.examples: Split glibc powerpc64 back into 2 ABI options
ELFv1 is the historically better supported one on glibc, ELFv2 seems to have some issues with our toolchain.

Restore the option to pick the ABI with pkgsCross.
2025-06-21 11:01:02 +02:00
aleksana 54e53047bf lib.systems.examples: separate loongarch64 for desktop and embedded variants 2025-05-22 19:59:54 +08:00
Alyssa Ross 7eb2580981 lib.systems.examples.riscv64-musl: init 2025-05-15 14:44:58 +02:00
K900 05bc93a58a Merge remote-tracking branch 'origin/master' into staging-next 2025-04-06 11:20:16 +03:00
Maciej Krüger 1000bcdd4d
lib.systems: Add arm-embedded-nano (#392204) 2025-04-06 00:10:57 +02:00
Emily 61582c7043 lib/systems: use Darwin architecture names for config and uname
`aarch64-apple-darwin` no longer works with LLVM 20.
2025-04-02 21:22:47 +01:00
Emily 1e6ab3434f treewide: drop support for 32‐bit Darwin
It’s dead, Jim.
2025-04-02 21:20:44 +01:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Ross Smyth 57ec4f3128 lib.systems: Add arm-embedded-nano
Newlib-nano variant of the arm-embedded stdenv.
2025-03-20 16:15:09 -04:00
John Ericson 07f8638828
freebsd: Add support for aarch64 (#358053) 2024-11-26 20:39:38 -05:00
Artemis Tosini 2b02a18ef7
freebsd: Add support for aarch64
Add a new `aarch64-freebsd` double and example system,
then fix include and libc to work.
This is enough to build packages like `hello`,
either static or dynamic.

This is useful for testing nix FreeBSD on a Raspberry Pi.
2024-11-24 03:03:28 +00:00
seth 4d874d59e2
lib.systems.examples: set rust.rustcTarget for ucrtAarch64
Closes https://github.com/NixOS/nixpkgs/issues/357751
2024-11-21 04:56:45 -05:00
seth b5bf8e3fc7
lib.systems.examples: add aarch64-w64-mingw32 2024-11-06 17:22:52 -05:00
Artturin aed1142d79 lib.systems.examples: Fix deprecated attr
`For android 'sdkVer' has been renamed to 'androidSdkVersion'`

While doing the above rename I forgot to consider if there were still
darwin platforms in `lib.systems.examples` using `sdkVer`

These still fail eval, but that happened before the renaming too.

`error: Unsupported sdk: 14.3`
2024-09-30 18:14:21 +03:00
Artturin 35e5943d69 lib.systems: throw if sdkVer or ndkVer are used for android.
Those attrs have been renamed and throwing is the best way to show it,
if we only warned then the user would only get an error like this `error: Unsupported sdk: 33`
from `pkgs/top-level/darwin-packages.nix`.

If someone wants to support multiple NixOS versions then they can simply
set both attrs. (`!args ? androidSdkVersion` is for that)
2024-07-25 23:49:18 +03:00
Artturin 1144d46f95 treewide: Rename android sdkVer and ndkVer
`sdkVer` conflicts with the old `sdkVer`(now `darwinSdkVersion` but that still uses `sdkVer` if set) used by darwin

This shouldn't be an issue but due to `pkgs/development/interpreters/python/cpython/default.nix`
running `lib.filterAttrs (n: v: ! lib.isDerivation v && n != "passthruFun")` on it's inputs (2 of them are darwin only)
the `throw "Unsupported sdk...` in `pkgs/top-level/darwin-packages.nix` will be triggered.

After this change `pkgsCross.armv7a-android-prebuilt.python3.pythonOnBuildForHost` won't fail with
`error: Unsupported sdk: 33`

Issue was bisected to 3cb23cec23
2024-07-25 22:08:49 +03:00
Florian Klink 641b2f29b6
Merge pull request #319153 from Kranzes/buildRustCrate-wasm
buildRustCrate: add support for compiling to wasm32-unknown-unknown
2024-06-30 14:05:33 +03:00
Ilan Joselevich 957116419d
lib.systems.examples: add wasm32-unknown-none
This system was added to use the nixpkgs cross compilation logic when
compiling to wasm32-unknown-unknown in rust.
2024-06-24 19:27:13 +03:00
Marie Ramlow 56d1e7a41b lib.systems.examples: update default android sdk to 33, ndk to 26 2024-06-17 09:53:31 +02:00
Florian Klink 50261c0602 config.rust: update references from rustc
`rustc.config` is called `rust.rustcTarget` now, and
`{rustc -> rust}.platform`.

This is the new way (tm), and is preferred since
https://github.com/NixOS/nixpkgs/pull/271707 -
though the documentation still is outdated, and some expressions in
nixpkgs were using the old interface.

This updates both.
2024-06-13 21:08:48 +03:00
Ali Abrar 888dee445d openbsd: init at 7.5 2024-05-26 10:55:56 -04:00
John Ericson 266cdd7d37 treewide: freebsd13 -> freebsd
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2024-04-30 18:20:23 -04:00
Jared Baur 6421226aa5 lib/systems: add microblaze-embedded
Adds a new target for `pkgsCross` that can be used for building
freestanding code for microblaze targets (e.g. Xilinx PMU firmware).
2024-04-24 19:45:58 -07: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
Artturi 6f300706ef
Merge pull request #247077 from jmbaur/aarch64-embedded-rustc 2023-09-23 06:30:47 +03:00
Moritz Angermann 1e0561d78a nixpkgs/systems: Add ucrt64 as MinGW libc
The Minimalist Gnu for Windows distribution comes with support for
the traditional msvcrt libc, as well as ucrt64 libc. The latter
being the newer universal compiler runtime. We follow the msys2
environment naming convention[1]:

| name       | toolchain | arch    | libc   | libc++    |
|------------|-----------|---------|--------|-----------|
| mingw32    | gcc       | i686    | msvcrt | libstdc++ |
| mingw64    | gcc       | x86_64  | msvcrt | libstdc++ |
| ucrt64     | gcc       | x86_64  | ucrt   | libstdc++ |
| clang32    | llvm      | i686    | ucrt   | libc++    |
| clang64    | llvm      | x86_64  | ucrt   | libc++    |
| clangarm64 | llvm      | aarch64 | ucrt   | libc++    |

For now nixpkgs only supports the first three with this commit.

--
[1]: https://www.msys2.org/docs/environments/
2023-09-08 10:56:08 +00:00
Jared Baur aca7042069
lib/systems: Add rustc config for aarch64-embedded
The target aarch64-none-elf is not a valid rustc target, use
aarch64-unknown-none instead.
2023-08-03 23:35:38 -07:00
Markus Theil f6f0ccd6c9 lib.systems.bluefield2: init
Add support for Nvidia's Bluefield 2 plattform as a compilation
target. There exists a version with and without crypto support,
while the crypto supported version is the most common one.

Support for the non-crypto version can be easily added in the future,
if needed.

For a datasheet of the hardware, see:

https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/documents/datasheet-nvidia-bluefield-2-dpu.pdf

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2023-07-14 11:19:11 +02:00
Ryan Burns c8ae88d97b lib.platforms.mips{,64}-embedded: init 2023-06-30 18:19:00 -07:00
Alyssa Ross 94d9a6ce17 lib.systems: remove mipsisa(32|64)r6 triples
These arc the same as the normal triples apart for a difference in
-march, so there's no need for them to be separate triples.
2023-06-01 10:42:27 +00:00
Weijia Wang 1348f199a5 lib/systems: move loongarch64-linux out of mips block 2023-05-04 09:52:01 +03:00
jackyliu16 edcad332d9 lib.platforms.loongarch64: init 2023-04-27 20:04:30 +03:00
sternenseemann 471b9cab41 haskell.compiler.ghcHEAD: 9.7.20221224 -> 9.7.20230217
- Christmas is over!

- Upstream has changed the name of the target triplet used for the JS
  backend from js-unknown-ghcjs to javascript-unknown-ghcjs, since Cabal
  calls the architecture "javascript":
  6636b67023

  Since the triplet is made up anyways, i.e. autoconf does not support
  it and Rust uses different triplets for its emscripten backends, we'll
  just change it as well.

- Upstream fixed the problem with ar(1) being invoked incorrectly by stage0:
  e987e345c8
2023-03-08 17:12:18 +01:00
John Ericson 66aa02f190 lib/systems: Support FreeBSD
A tricky thing about FreeBSD is that there is no stable ABI across
versions. That means that putting in the version as part of the config
string is paramount.

We have a parsed represenation that separates name versus version to
accomplish this. We include FreeBSD versions 12 and 13 to demonstrate
how it works.
2022-11-04 16:49:28 -04:00
John Ericson f172d86a4e lib/systems: Simplify NetBSD examples
The libc will be inferred.
2022-11-04 16:49:28 -04:00
Minijackson cdb0f02a36 lib/systems/examples: use provided ABIs in PPC64 triple 2022-08-28 21:46:44 +02:00
Rick van Schijndel 9532db9eb7
Merge pull request #160554 from Cloudef/android-prebuilt
Fix android prebuilt toolchains
2022-07-18 10:01:00 +02:00
Alyssa Ross e8d7d52fae lib.systems.examples: canonicalize MIPS triples
In Nixpkgs, we assume that the "config" field is a canonicalized GNU
triple.  I noticed that non-canonical values were being used here,
because the pkgsCross.mips64el-linux-gnu triples did not contain the
vendor field, but the pkgsCross.mips64el-linux-gnu.pkgsStatic did.

Here, I've run all the MIPS triples in lib.systems.examples through
config.sub to canonicalize them.  I think this will avoid nasty
surprises in future.

Tested by building Nix and the bootstrap files for
pkgsCross.mips64el-linux-gnu.
2022-07-03 23:01:21 +00:00
Jari Vetoniemi 2a914f022c update android targets to recommended ones 2022-06-29 18:27:16 +09:00
Alyssa Ross 74562a214e
lib.systems.amd64-netbsd: remove
This has been deprecated for a long time, and it's doubtful it had any
users to start with.  And having an undisablable warning when
enumarating platforms is not good.
2022-06-08 17:14:05 +00:00
Alyssa Ross 089ff89f49
lib.systems: drop scaleway-c1
These servers apparently no longer exist, since September 2, 2021[1].
If somebody needs this for non-Scaleway machines, they should suggest
its reintroduction with a different name.

[1]: https://news.ycombinator.com/item?id=27192757
2022-05-27 12:02:39 +00:00
yvt bf139d83ec
systems: support cross-compiling for Renesas RX microcontrollers (#173858) 2022-05-22 20:52:36 -04:00