summary refs log tree commit diff
path: root/lib/systems/doubles.nix
Commit message (Collapse)AuthorAge
* lib/systems: add mips64el definitionsAdam Joseph2022-03-10
| | | | | | | | | | | | | | | | | | | | | | 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.
* pkgsCross.ppcle-embedded: fix evalJörg Thalheim2021-12-09
|
* pkgsCross.aarch64be-embedded: fix evalJörg Thalheim2021-12-09
|
* lib/systems: add minimal s390x-linux cross-compile supportSergei Trofimovich2021-09-09
| | | | | | | | | | | 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
* lib.systems: add m68k-netbsd supportAlyssa Ross2021-08-01
| | | | | | | m68k was recently added for Linux and none, but NetBSD also supports m68k. Nothing will build yet, but I want to make sure we at least encode the existence of NetBSD support for every applicable architecture we support for other operating systems.
* lib.systems.doubles: re-sortAlyssa Ross2021-08-01
| | | | These were alphabetically sorted until m68k and s390 were added.
* Initial implementation of s390 cross-compileBen Siraphob2021-07-25
|
* Initial implementation of m68k cross-compileBen Siraphob2021-07-24
|
* mesaPlatforms: Welcome riscv64-linux to the familyZhaofeng Li2021-06-12
|
* lib/systems: add aarch64-darwin to mesaPlatformsMatthew Bauer2021-05-17
|
* lib.systems.doubles.netbsd: expandAlyssa Ross2021-04-23
| | | | | | | These are all the architectures supported by Nixpkgs on other platforms, that are also supported by NetBSD. (So I haven't added any architectures that are new to Nixpkgs here, even though NetBSD supports some that we don't have.)
* lib.systems.doubles.all: reorganizeAlyssa Ross2021-04-23
| | | | | | | | | | | The previous mess was partially grouped by OS, and partially grouped by architecture, which made it very difficult to know where to add new entries. I've chosen to group by OS entirely, because OSes are likely to maintain exhaustive lists of supported architectures, but it's far less likely we'd be able to find exhaustive lists of supported OSes for every architecture.
* lib/systems: remove powerpc64 elfv1 supportRyan Burns2021-03-15
| | | | | I was specifying the ELF ABI using -elfv1 and -elfv2 target config suffixes, which are nonstandard and no longer work with gnu-config.
* lib.systems: add powerpc64-linuxRyan Burns2021-01-30
| | | | | | | | | | | | | | | | | 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.
* Merge master into staging-nextFrederik Rietdijk2020-11-16
|\
| * Initial implementation of mmix cross-compileBen Siraphob2020-11-09
| |
* | Initial support for OpenRISC 1000 (or1k)Samuel Dionne-Riel2020-11-09
|/
* platforms: add bigEndian and littleEndianFrancesco Gazzetta2020-09-20
|
* Define a i686-genode system doubleEmery Hemingway2020-08-04
|
* redox: add as targetAaron Janse2020-07-21
|
* lib/systems: Add Genode platform definitionsEmery Hemingway2020-03-24
| | | | | | | Add platform definitions for 64-bit ARM and x86. This is sufficient for for building Genode where a toolchain is provided as an overlay. Toolchain: git+https://git.sr.ht/~ehmry/genodepkgs?rev=14fc773ac9ecd2cbb30cb4612b284eee83d83546
* lib: Add armv6l-none to doubles listJohn Ericson2020-03-12
|
* Merge branch 'ghcjs-cross-without-cc-19.09' into ghcjs-cross-without-ccJohn Ericson2019-11-25
|\
| * Fix lib testsJohn Ericson2019-11-25
| | | | | | | | js-ghcjs didn't fit in an existing categor.
* | Merge remote-tracking branch 'upstream/master' into ghcjs-cross-without-ccJohn Ericson2019-11-25
|\ \ | |/ |/|
| * initial implementation of vc4 cross-compileMichael Bishop2019-11-19
| |
* | 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.
* lib: Add armv7a-linux to doubles.nixJohn Ericson2019-10-01
| | | | This is needed for android.
* treewide: remove redundant recvolth2019-08-28
|
* Add RISC-V embedded crossSystemsJay Kruer2019-07-25
|
* Revert "Revert "systems/doubles.nix: add Apple doubles""Matthew Bauer2019-07-10
| | | | | | | | | | This reverts commit ce2f74df2cade57e74c235292c8b074281903e71. Doubles are treated as -darwin here, to provide some consistency. There is some ambiguity between “x86_64-darwin” and “i686-darwin” which could refer to binaries linked between iOS simulator or real macOS binaries. useiOSPrebuilt can be used to determine which to use, however.
* Revert "systems/doubles.nix: add Apple doubles"Frederik Rietdijk2019-07-10
| | | | | | | | The lib tests need to be fixed as well. This unbreaks the tarball job. This reverts commit 00ba557856d6217121e50ea69c251e9458d9dc08.
* systems/doubles.nix: add Apple doublesMatthew Bauer2019-07-08
| | | | | | These are used in cross-compilation to iOS devices and simulators. Fallout from #60349.
* systems: fix lib-testsMatthew Bauer2019-06-04
| | | | | These were broken by the added system doubles. This just adds those to the lib-tests.
* systems: fixup from last commitMatthew Bauer2019-06-04
| | | | it’s powerpc-none not ppc-none
* systems: add missing doublesMatthew Bauer2019-06-04
| | | | | | | | | in https://github.com/NixOS/nixpkgs/pull/60349, the attr handling was removed. This means we rely on these double values for determing what we are compatible with. This adds some of the missing doubles to this list. https://hydra.nixos.org/eval/1523389#tabs-removed
* systems: add riscv doubleMatthew Bauer2019-04-30
| | | | This was never listed in doubles.nix! Not sure why?
* 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.
* mesa: armv7a-linux supports mesaMatthew Bauer2019-02-24
|
* tests/systems.nix: fix testsMatthew Bauer2018-10-18
| | | | these weren’t being run correctly
* Correctly set windows doublesMatthew Bauer2018-10-17
| | | | mingw is the toolchain name but it is actually run on a window kernel
* systems/doubles.nix: add mingw doublesMatthew Bauer2018-10-16
| | | | this makes it easier to show what supports windows vs. unix.
* hurd: cleanup unmaintained targetJörg Thalheim2018-08-28
| | | | | | This has been not touched in 6 years. Let's remove it to cause less problems when adding new cross-compiling infrastructure. This also simplify gcc significantly.
* [RFC] ppc64le enablement (#45340)CrystalGamma2018-08-21
| | | | | | | | | | | | | | | | * ppc64le enablement * gcc, glibc: properly handle __float128 * lib/systems, stdenv: syntax cleanup * gcc7: remove ugly hack * gcc: add/update __float128 flags * stdenv: add another pair of quotes for consistency * gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
* treewide: isArm -> isAarch32John Ericson2018-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following legacy packing conventions, `isArm` was defined just for 32-bit ARM instruction set. This is confusing to non packagers though, because Aarch64 is an ARM instruction set. The official ARM overview for ARMv8[1] is surprisingly not confusing, given the overall state of affairs for ARM naming conventions, and offers us a solution. It divides the nomenclature into three levels: ``` ISA: ARMv8 {-A, -R, -M} / \ Mode: Aarch32 Aarch64 | / \ Encoding: A64 A32 T32 ``` At the top is the overall v8 instruction set archicture. Second are the two modes, defined by bitwidth but differing in other semantics too, and buttom are the encodings, (hopefully?) isomorphic if they encode the same mode. The 32 bit encodings are mostly backwards compatible with previous non-Thumb and Thumb encodings, and if so we can pun the mode names to instead mean "sets of compatable or isomorphic encodings", and then voilà we have nice names for 32-bit and 64-bit arm instruction sets which do not use the word ARM so as to not confused either laymen or experienced ARM packages. [1]: https://developer.arm.com/products/architecture/a-profile
* lib, stdenv: Check `meta.platforms` against host platform and be open worldJohn Ericson2018-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | First, we need check against the host platform, not the build platform. That's simple enough. Second, we move away from exahustive finite case analysis (i.e. exhaustively listing all platforms the package builds on). That only work in a closed-world setting, where we know all platforms we might build one. But with cross compilation, we may be building for arbitrary platforms, So we need fancier filters. This is the closed world to open world change. The solution is instead of having a list of systems (strings in the form "foo-bar"), we have a list of of systems or "patterns", i.e. attributes that partially match the output of the parsers in `lib.systems.parse`. The "check meta" logic treats the systems strings as an exact whitelist just as before, but treats the patterns as a fuzzy whitelist, intersecting the actual `hostPlatform` with the pattern and then checking for equality. (This is done using `matchAttrs`). The default convenience lists for `meta.platforms` are now changed to be lists of patterns (usually a single pattern) in `lib/systems/for-meta.nix` for maximum flexibility under this new system. Fixes #30902
* treewide: get rid of platforms.allButJohn Ericson2018-03-14
| | | | | | | Negative reasoning like `allBut` is a bad idea with an open world of platforms. Concretely, if we add a new, quite different sort of platform, existing packages with `allBut` will claim they work on it even though they probably won't.
* lib, treewide: Add missing MIPS arches, and fix existing usageDaniel Barlow2018-02-23
| | | | | | | | | Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets
* lib: Avoid double importJohn Ericson2018-01-31
|
* Convert libs to a fixed-pointGraham Christensen2017-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does break the API of being able to import any lib file and get its libs, however I'm not sure people did this. I made this while exploring being able to swap out docFn with a stub in #2305, to avoid functor performance problems. I don't know if that is going to move forward (or if it is a problem or not,) but after doing all this work figured I'd put it up anyway :) Two notable advantages to this approach: 1. when a lib inherits another lib's functions, it doesn't automatically get put in to the scope of lib 2. when a lib implements a new obscure functions, it doesn't automatically get put in to the scope of lib Using the test script (later in this commit) I got the following diff on the API: + diff master fixed-lib 11764a11765,11766 > .types.defaultFunctor > .types.defaultTypeMerge 11774a11777,11778 > .types.isOptionType > .types.isType 11781a11786 > .types.mkOptionType 11788a11794 > .types.setType 11795a11802 > .types.types This means that this commit _adds_ to the API, however I can't find a way to fix these last remaining discrepancies. At least none are _removed_. Test script (run with nix-repl in the PATH): #!/bin/sh set -eux repl() { suff=${1:-} echo "(import ./lib)$suff" \ | nix-repl 2>&1 } attrs_to_check() { repl "${1:-}" \ | tr ';' $'\n' \ | grep "\.\.\." \ | cut -d' ' -f2 \ | sed -e "s/^/${1:-}./" \ | sort } summ() { repl "${1:-}" \ | tr ' ' $'\n' \ | sort \ | uniq } deep_summ() { suff="${1:-}" depth="${2:-4}" depth=$((depth - 1)) summ "$suff" for attr in $(attrs_to_check "$suff" | grep -v "types.types"); do if [ $depth -eq 0 ]; then summ "$attr" | sed -e "s/^/$attr./" else deep_summ "$attr" "$depth" | sed -e "s/^/$attr./" fi done } ( cd nixpkgs #git add . #git commit -m "Auto-commit, sorry" || true git checkout fixed-lib deep_summ > ../fixed-lib git checkout master deep_summ > ../master ) if diff master fixed-lib; then echo "SHALLOW MATCH!" fi ( cd nixpkgs git checkout fixed-lib repl .types )