about summary refs log tree commit diff
path: root/lib/systems/parse.nix
Commit message (Collapse)AuthorAge
* lib: Fix Mingw on 32-bit ARMJohn Ericson2019-01-04
|
* systems/parse.nix: support eabihfMatthew Bauer2018-12-02
| | | | | | | | | | | | eabihf is an abi that can be used with ARM architectures that support the “hard float”. It should probably only be used with ARM32 when you are absolutely sure your binaries will run on ARM systems with a FPU. Also, add an example "armhf-embedded" to match the preexisting arm-embedded system. qmk_firmware needs hard float in a few places, so add them here to get that to work. Fixes #51184
* systems/parse: add older x86 architecturesMatthew Bauer2018-11-21
| | | | | i386, i486, i586 are added. These may have issues as many places assume i686 is the only valid 32 bit x86 architecture.
* Update parse.nixVincent Weisner2018-11-02
|
* CPU FixJörg Thalheim2018-11-01
| | | Co-Authored-By: vincrusher <vincentweisner@icloud.com>
* Update parse.nixVincent Weisner2018-11-01
|
* systems/examples: add i686 & x86-64 embeddedMatthew Bauer2018-10-30
| | | | Fixes #28160
* systems/parse.nix: support weird system configsMatthew Bauer2018-10-29
| | | | | | | | There are some weird ones out there that don’t follow any pattern: - arm-none-eabi - powerpc-none-eabi - aarch64-none-elf
* avr: use new compilation infrastructureMatthew Bauer2018-10-29
| | | | | | | | | | Gets rid of: avrbinutils avrgcc to replace with: pkgsCross.avr.buildPackages.binutils pkgsCross.avr.buildPackages.gcc
* 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
* systems: fix netbsd triple parsingMatthew Bauer2018-07-28
| | | | | | | | binutils expects x86_64-unknown-netbsd<version> (only 3 parts!). Any other combo seems to fail. Also handle darwin versions similarly. /cc @Ericson2314
* systems: Allow detection of powerpc and sparcJohn Q Crosscompiler2018-07-26
|
* Merge branch 'fix-gcc-with-float'John Ericson2018-05-12
|\
| * lib: Fix float handling for Aarch32John Ericson2018-05-12
| | | | | | | | Forgot to adjust default so abi with explicit float attr would be used.
* | lib/system: Remove float from androideabiJohn Ericson2018-05-11
| | | | | | | | | | | | | | | | There are two different official variations which differ in their float support, so such a blanket statement is invalid. `lib.systems.platforms.*android` already handles each case correctly. Correcting an error in 827ef0914089e1a2bba140b49e1311eff28cc156.
* | lib/systems: Add assertion to "android" ABIJohn Ericson2018-05-11
| | | | | | | | This is analogous to the GNU assertion.
* | Merge pull request #40378 from obsidiansystems/lib-platform-sortJohn Ericson2018-05-11
|\| | | | | lib/systems: Sort platforms, and space CPUs
| * lib/systems: Sort platforms, and space CPUsJohn Ericson2018-05-11
| |
* | Merge remote-tracking branch 'upstream/master' into lib-floatJohn Ericson2018-05-10
|\ \ | |/ |/|
| * lib/systems: Prohibit "gnu" ABI (*-gnu) with 32-bit ARMJohn Ericson2018-05-10
| | | | | | | | It is ambiguous, and therefore banned within GCC.
| * Merge commit '70963b382f3f820ba6d3bc3b3aaf50a2957ec1ff' into uclibcJohn Ericson2018-05-10
| |\
| | * 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
| | * Merge pull request #38485 from obsidiansystems/nixos-nixpkgs-optionsJohn Ericson2018-04-19
| | |\ | | | | | | | | nixpkgs module: Clean up platform options
| | | * nixpkgs module: Clean up platform optionsJohn Ericson2018-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `localSystem` is added, it strictly supercedes system - `crossSystem`'s description mentions `localSystem` (and vice versa). - No more weird special casing I don't even understand TEMP
| | * | Fix a typo: types.openSignifiantByte -> types.openSignificantByteJohn Wiegley2018-04-13
| | |/
| | * lib: Split Darwin into macOS and iOSJohn Ericson2018-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed LLVM accepts `ios` as its own OS in platform triples; a recent change as far as I know. I see it also accepts `macos*` for macOS (formerly OS X). If it's now customary to distinguish iOS like so (rather than guessing from the aarch, lets add both so our OSes are still disjoint, and make Darwin a family instead. But changing the config everywhere would probably be a mass rebuild, and I'm not sure how well other software supports OSes besides "darwin", so I'm keeping that the default name for macOS for now.
* | | lib: Clean up float/fpu optionsJohn Ericson2018-05-10
|/ / | | | | | | | | | | ARM ABIs now have a float field. This is used as a fallback to lessen our use of `platform.gcc.float`. I didn't know what the MIPs convention is so I kept using `platform.gcc.float` in that case.
* | lib/systems: Add uClibc just like MUSLJohn Ericson2018-05-09
| |
* | lib/systems: Parse more arm cpu typesJohn Ericson2018-05-09
| |
* | 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 (cherry picked from commit ba52ae50488de85a9cf60a3a04f1c9ca7122ec74)
* prebuilt android tools: Init using SDKJohn Ericson2018-02-27
| | | | Expose as an option for the cross stdenv.
* 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/systems: musl, libc predicatesWill Dietz2018-02-11
| | | | | | Note this doesn't actually provide musl support yet, just improves our "system" code to understand musl-based triples and non-glibc linux configurations.
* lib: Better use the module type system in platform parsingJohn Ericson2018-01-30
| | | | | | | | | I need some module system types here so I can next fix meta-checks for derivations. I'd like to use a "proper" record type here, but submodule types seem overkill so holding off with ad-hoc stuff for now. In practice, all I need for the next step are the `.check` functions so this is good, especially as the submodule check function is shallow, saving full inductive type-checking for a later step.
* lib: Allow parsing platform configs with arch of `{riscv,wasm}{32,64}`John Ericson2018-01-26
| | | | Also add `isRiscv` and `isWasm` predicates.
* 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 )
* Fix "treewide: Consistently call ARM 'arm'"Tuomas Tynkkynen2017-08-24
| | | | | | 0c0fad6141cf3d62 was broken. I didn't realize there's some hidden metaprogramming code where one can't even grep for 'isFoo' to find its definition :(
* lib: Add isPowerPC predicate, and fix family nameJohn Ericson2017-07-10
|
* stdenv: remove unix kernel familyDavid McFarland2017-06-26
| | | | | System predicate patterns can now be specified as a list of OR'd attribute sets.
* cygwin: fix doubleFromSystem for cygwinDavid McFarland2017-06-26
|
* stdenv: Rename `isGNU` to `isHurd` as GNU is a userlandJohn Ericson2017-05-22
| | | | | Elsewhere, things called GNU indeed includes GNU/Linux or GNU/Hurd, but this predicate was defined excluding Linux regardless of userland.
* lib: Make platform predicates more ergonomic to useJohn Ericson2017-05-22
| | | | | `hostPlatform.isDarwin` instead of `lib.system.parse.isDarwin hostPlatform.parsed`
* lib platform parsing: Whitelist `darwin10` and `darwin14` as stopgapJohn Ericson2017-05-17
| | | | | Something better should be done longer term to support such version suffixes.
* lib platform parsing: Fix windows support to conform to LLVM, take 2John Ericson2017-05-17
| | | | | | | Second attempt at pull request #25275 This reverts commit b70924bd80918d153a5e2023afd7647ae7b24a12, reapplying 2282a5774cd80567644a44d31585bf965a55f9ec
* Revert "Merge pull request #25275 from Ericson2314/platform-normalize"Vladimír Čunát2017-05-06
| | | | | | | | This reverts commit 2282a5774cd80567644a44d31585bf965a55f9ec, reversing changes made to 14adea91566019549f33392d4710d9babd0108d7. The lib tests are bloking nixpkgs-unstable, and I don't like debugging it soon enough.
* lib platform parsing: Fix windowsJohn Ericson2017-04-27
| | | | | | | | 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
* lib platform parsing: Turn assertion back onJohn Ericson2017-04-27
|
* lib: Whitelist two ABIs used on ArmJohn Ericson2017-04-25
|
* lib: Fix system parsing, and use for doubles listsJohn Ericson2017-04-17
| | | | | | | 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