about summary refs log tree commit diff
path: root/lib/systems/examples.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-06-13config.rust: update references from rustcFlorian Klink1-3/+3
`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-05-26openbsd: init at 7.5Ali Abrar1-0/+5
2024-04-30treewide: freebsd13 -> freebsdJohn Ericson1-1/+1
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2024-04-24lib/systems: add microblaze-embeddedJared Baur1-0/+5
Adds a new target for `pkgsCross` that can be used for building freestanding code for microblaze targets (e.g. Xilinx PMU firmware).
2023-11-04lib.systems, test.cross.sanity: add test case for #264989Adam Joseph1-0/+1
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-09-23Merge pull request #247077 from jmbaur/aarch64-embedded-rustcArtturi1-0/+1
2023-09-08nixpkgs/systems: Add ucrt64 as MinGW libcMoritz Angermann1-0/+5
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-08-03lib/systems: Add rustc config for aarch64-embeddedJared Baur1-0/+1
The target aarch64-none-elf is not a valid rustc target, use aarch64-unknown-none instead.
2023-07-14lib.systems.bluefield2: initMarkus Theil1-0/+4
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-06-30lib.platforms.mips{,64}-embedded: initRyan Burns1-0/+10
2023-06-01lib.systems: remove mipsisa(32|64)r6 triplesAlyssa Ross1-12/+6
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-05-04lib/systems: move loongarch64-linux out of mips blockWeijia Wang1-4/+4
2023-04-27lib.platforms.loongarch64: initjackyliu161-0/+4
2023-03-08haskell.compiler.ghcHEAD: 9.7.20221224 -> 9.7.20230217sternenseemann1-1/+4
- 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": https://gitlab.haskell.org/ghc/ghc/-/commit/6636b670233522f01d002c9b97827d00289dbf5c 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: https://gitlab.haskell.org/ghc/ghc/-/commit/e987e345c807035e4637ca3eae227ae501e16c42
2022-11-04lib/systems: Support FreeBSDJohn Ericson1-0/+5
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-04lib/systems: Simplify NetBSD examplesJohn Ericson1-2/+0
The libc will be inferred.
2022-08-28lib/systems/examples: use provided ABIs in PPC64 tripleMinijackson1-3/+2
2022-07-18Merge pull request #160554 from Cloudef/android-prebuiltRick van Schijndel1-5/+5
Fix android prebuilt toolchains
2022-07-03lib.systems.examples: canonicalize MIPS triplesAlyssa Ross1-14/+12
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-06-29update android targets to recommended onesJari Vetoniemi1-5/+5
2022-06-08lib.systems.amd64-netbsd: removeAlyssa Ross1-2/+0
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-05-27lib.systems: drop scaleway-c1Alyssa Ross1-2/+0
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-22systems: support cross-compiling for Renesas RX microcontrollers (#173858)yvt1-0/+5
2022-03-10Ericson2314's suggestion here: ↵Adam Joseph1-3/+19
https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822295406
2022-03-10comment: explain why gnuabi64 has a rustc.config but gnuabin32 does not.Adam Joseph1-1/+1
2022-03-10lib/systems: add mips64el definitionsAdam Joseph1-0/+4
MIPS has a large space of {architecture,abi,endianness}; this commit adds all of them to lib/systems/platforms.nix so we can be done with it. Currently lib/systems/inspect.nix has a single "isMips" predicate, which is a bit ambiguous now that we will have both mips32 and mips64 support, with the latter having two ABIs. Let's add four new predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and treat the now-ambiguous isMips as deprecated in favor of the more-specific predicates. These predicates are used mainly for enabling/disabling target-specific workarounds, and it is extremely rare that a platform-specific workaround is needed, and both mips32 and mips64 need exactly the same workaround. The separate predicates (isMips64n32 and isMips64n64) for ABI distinctions are, unfortunately, useful. Boost's user-scheduled threading (used by nix) does does not currently supports mips64n32, which is a very desirable ABI on routers since they rarely have more than 2**32 bytes of DRAM.
2021-12-09pkgsCross.x86_64-netbsd-llvm: mark as brokenJörg Thalheim1-0/+1
2021-11-10lib/systems: add x86_64-darwin hostPlatformJonathan Ringer1-0/+6
2021-09-09lib/systems: add minimal s390x-linux cross-compile supportSergei Trofimovich1-0/+4
Tested basic functionality as: $ nix-build --arg crossSystem '{ config = "s390x-unknown-linux-gnu"; }' -A re2c $ file ./result/bin/re2c $ ./result/bin/re2c: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter ...-gnu-2.33-50/lib/ld64.so.1, for GNU/Linux 2.6.32, not stripped $ qemu-s390x ./result/bin/re2c --version re2c 2.2
2021-07-25Initial implementation of s390 cross-compileBen Siraphob1-0/+4
2021-07-24Initial implementation of m68k cross-compileBen Siraphob1-0/+4
2021-05-17Add crossPkgs.aarch64-darwinMoritz Angermann1-0/+6
2021-05-11treewide: Support aarch64-android using minimal prebuilt componentss13411-0/+9
This PR adds a new aarch64 android toolchain, which leverages the existing crossSystem infrastructure and LLVM builders to generate a working toolchain with minimal prebuilt components. The only thing that is prebuilt is the bionic libc. This is because it is practically impossible to compile bionic outside of an AOSP tree. I tried and failed, braver souls may prevail. For now I just grab the relevant binaries from https://android.googlesource.com/. I also grab the msm kernel sources from there to generate headers. I've included a minor patch to the existing kernel-headers derivation in order to expose an internal function. Everything else, from binutils up, is using stock code. Many thanks to @Ericson2314 for his help on this, and for building such a powerful system in the first place! One motivation for this is to be able to build a toolchain which will work on an aarch64 linux machine. To my knowledge, there is no existing toolchain for an aarch64-linux builder and an aarch64-android target.
2021-04-15Merge master into staging-nextgithub-actions[bot]1-2/+1
2021-04-15lib.systems.examples.amd64-netbsd: add warningAlyssa Ross1-2/+1
Otherwise, nobody will know it's deprecated!
2021-04-15Merge master into staging-nextgithub-actions[bot]1-1/+10
2021-04-15lib: Adjust NetBSD example systemsJohn Ericson1-1/+10
Deprecate the odd one so no breaking change.
2021-04-12Merge remote-tracking branch 'upstream/staging-next' into down-integrate-stagingLuke Granger-Brown1-7/+5
2021-04-12Merge pull request #116495 from r-burns/ppc64Sandro1-7/+3
lib/systems: remove powerpc64 elfv1 support
2021-04-11lib.systems: add darwinPlatform where necessaryAndrew Childs1-0/+2
2021-04-09systems: add appropriate rustc.config for androidMilan Pässler1-0/+2
Rust doesn't like the `-unknown` vendor component in the target triple.
2021-03-15lib/systems: remove powerpc64 elfv1 supportRyan Burns1-7/+3
I was specifying the ELF ABI using -elfv1 and -elfv2 target config suffixes, which are nonstandard and no longer work with gnu-config.
2021-01-30Merge pull request #111345 from r-burns/ppc64-big-endianJohn Ericson1-0/+13
Enable PPC64 (big-endian)
2021-01-30lib.systems: add powerpc64-linuxRyan Burns1-0/+13
PPC64 supports two ABIs: ELF v1 and v2. ELFv1 is historically what GCC and most packages expect, but this is changing because musl outright does not work with ELFv1. So any distro which uses musl must use ELFv2. Many other platforms are moving to ELFv2 too, such as FreeBSD (as of v13) and Gentoo (as of late 2020). Since we use musl extensively, let's default to ELFv2. Nix gives us the power to specify this declaratively for the entire system, so ELFv1 is not dropped entirely. It can be specified explicitly in the target config, e.g. "powerpc64-unknown-linux-elfv1". Otherwise the default is "powerpc64-unknown-linux-elfv2". For musl, "powerpc64-unknown-linux-musl" must use elfv2 internally to function.
2021-01-29gcc: fix armhf targetAlexander Foremny1-0/+6
Fixes #96921
2021-01-23Merge pull request #100687 from spease/add-newer-xcode-hashesMatthew Bauer1-8/+8
darwin: update xcode versions
2021-01-23lib: Clean up how linux and gcc config is specifiedJohn Ericson1-38/+10
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that commit for details. This reverts commit 0bc275e63423456d6deb650e146120c39c1e0723.
2021-01-22Revert "lib: Clean up how linux and gcc config is specified"Jonathan Ringer1-10/+38
This is a stdenv-rebuild, and should not be merged into master This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65.
2021-01-21lib: Clean up how linux and gcc config is specifiedJohn Ericson1-38/+10
The `platform` field is pointless nesting: it's just stuff that happens to be defined together, and that should be an implementation detail. This instead makes `linux-kernel` and `gcc` top level fields in platform configs. They join `rustc` there [all are optional], which was put there and not in `platform` in anticipation of a change like this. `linux-kernel.arch` in particular also becomes `linuxArch`, to match the other `*Arch`es. The next step after is this to combine the *specific* machines from `lib.systems.platforms` with `lib.systems.examples`, keeping just the "multiplatform" ones for defaulting.
2021-01-19Merge branch 'master' into add-newer-xcode-hashesSteven Pease1-3/+24