3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

408 commits

Author SHA1 Message Date
Fabián Heredia Montiel 1b7776a3fb lib.systems: add znver4 architecture 2023-06-16 13:47:10 -06:00
Robert Hensing 144018541b lib.systems.equals: Ignore all function attributes reflectively
Co-authored-by: Artturi <Artturin@artturin.com>
2023-06-13 10:22:06 +02:00
Robert Hensing 18c7f6237f lib.systems.{equals,toLosslessStringMaybe}: init 2023-06-13 10:17:02 +02:00
Alyssa Ross 4e80f80864 lib.systems.doubles: add big-endian MIPS linux doubles
We already have examples for these, but since we didn't actually
recognise the doubles, it wasn't possible to build any packages for
them without setting allowUnsupportedSystem.
2023-06-01 10:42:27 +00: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
Alyssa Ross 91488fb6db
lib.systems: remove (accidental?) rust/rustc alias
I imagine this was supposed to be rustc = args.rustc, like the other
two lines.  This meant that we accepted both rust and rustc
attributes, with the same effect.  I doubt anybody was using the
undocumented, probably-accidental "rust" spelling, but we should
remove it before somebody starts.

In fact, we don't need to set rustc here at all, because no value
platforms.select could return will ever include a rustc key (unlike
the other two), so then rustc will be filled in later, when args is
merged into final.
2023-05-09 17:49:05 +00:00
Adam Joseph 89325a10b0
Merge pull request #228013 from amjoseph-nixpkgs/pr/qemuArch/mips
lib/systems: add mips64[el] entries to qemuArch
2023-05-09 06:39:13 +00:00
github-actions[bot] bf19e21376
Merge master into staging-next 2023-05-04 12:01:18 +00:00
Weijia Wang 1348f199a5 lib/systems: move loongarch64-linux out of mips block 2023-05-04 09:52:01 +03:00
github-actions[bot] e1fd5ee13e
Merge staging-next into staging 2023-04-28 12:01:49 +00:00
Weijia Wang b2ef7956b6
Merge pull request #227560 from jackyliu16/loongnix-commit
lib.platforms.loongarch64: init
2023-04-28 13:21:42 +03:00
Alyssa Ross e5d1511d5b lib.systems: allow specifying libc = null
It makes sense to allow platform definitions to opt out of having libc
at all.  One use case would be targetting some obscure new Linux
target that doesn't have a libc implementation yet, and another is
UEFI, which is basically libc-less Windows.

Not having libc is not commonly specified in (GNU) triples (even
Linux's build system will just target either -gnu or -musl depending
on the platform), so instead, we use a separate attribute for it.
2023-04-28 10:01:22 +00:00
jackyliu16 edcad332d9 lib.platforms.loongarch64: init 2023-04-27 20:04:30 +03:00
Adam Joseph 7001445909 lib/systems: add mips64[el] entries to qemuArch
This commit adds `mips64el` to the `qemuArch` table.
2023-04-24 13:17:45 -07:00
Adam Joseph ed65f784a7
Merge pull request #191995 from amjoseph-nixpkgs/lib/systems/inspect/comment
lib/systems/inspect.nix: explanatory comment
2023-04-24 02:21:36 +00:00
Artturin 06e8d82e9c lib/systems: disable docs in qemu-user
45M -> 31M
2023-04-22 00:38:56 +03:00
github-actions[bot] bf7ad8aa57
Merge master into haskell-updates 2023-03-10 00:14:11 +00:00
Alyssa Ross bc7d355dc0 lib.systems: don't try to emulate s390-linux
We don't have an emulator that can do this.
2023-03-09 19:25:23 +00: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
Atemu 19e81a9269
Merge pull request #211950 from Atemu/armv8-no-more-armv7
lib/systems/parse: stop considering armv8a able to execute armv7l
2023-03-07 19:25:32 +01:00
Sandro d05e6727a2
Merge pull request #203539 from SuperSandro2000/architectures-expand-inferiors
lib/systems/architectures: expand inferiors
2023-02-15 16:27:00 +01:00
github-actions[bot] dd1ff149da
Merge master into staging-next 2023-01-31 00:02:31 +00:00
Florian Klink 31931ffc35
Merge pull request #212939 from amjoseph-nixpkgs/pr/isStatic
meta: replace predicates with pattern over elaborated platform
2023-01-30 21:13:15 +01:00
Alyssa Ross aa51704ba5
lib.systems.inspect.patterns.isEfi: drop ARMv5
I'm not aware of any ARMv5 EFI implementation.  gnu-efi doesn't
support it, so the build of systemd for armv5tel-linux is broken if
it's isEfi.
2023-01-30 19:54:06 +00:00
Alyssa Ross 4f8a5065d7
lib.systems.inspect.patterns.isEfi: remove "aarch64"
There is no "aarch64" CPU family — it counts as "arm", as can be seen
from the definition of isAarch64 above.

Checked that stdenv.hostPlatform.isEfi is still true on aarch64-linux.
2023-01-29 16:29:47 +00:00
Adam Joseph 9c0a3417c8
Update lib/systems/inspect.nix
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27 11:56:20 +00:00
Adam Joseph 009a3f1857
Update lib/systems/inspect.nix
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27 11:16:35 +00:00
Adam Joseph ea0bcf2505 lib/systems/inspect.nix: add platformPatterns.isStatic 2023-01-27 02:21:23 -08:00
Atemu 44e5b41871 lib/systems/parse: stop considering armv8a able to execute armv7l
In the past, most (if not all) armv8 CPUs could also execute armv7. However,
with the advent of Apple Silicon, aarch64 CPUs without any aarch32 capabilities
are now wide-spread among users.
2023-01-21 16:28:49 +01:00
Alyssa Ross 6d165a9474
lib.platforms.s390x: init 2023-01-19 17:43:50 +00:00
Alyssa Ross 541a2a5e91
lib.platforms.power: init 2023-01-19 17:43:49 +00:00
Alyssa Ross 48f3fd2d49
lib.platforms.armv7: init 2023-01-19 17:43:41 +00:00
Nick Cao 35bede2be5
Merge pull request #184521 from dramforever/riscv-isefi
lib/systems/inspect.nix: Add riscv to isEfi
2023-01-13 14:28:11 +08:00
Adam Joseph 06939ff3de add mipsisa{32,64}r6[el], closes 209952 2023-01-09 16:04:16 -08:00
Martin Weinelt b38111a665
Merge pull request #208698 from amjoseph-nixpkgs/pr/nss/ilp32 2023-01-03 07:00:45 +01:00
Adam Joseph 14f337afb6 lib/systems/inspect.nix: add isILP32 predicate
I've run into a few packages that need an extra flag on platforms
where `int` has more bits than `void*` does.  I know of three such
platforms:

* [aarch64ilp32], used on both Linux and also on the [Apple Watch]
* [x32], the x86 ILP32 ABI
* [mips64n32], used on [Longsoon] and Cavium Octeon routers.

This PR introduces a predicate so the package flags can be added in
a generic way.

[Apple Watch]: https://gist.github.com/woachk/943828f37c14563a607a26116435bf27#watch
[mips64n32]: https://en.wikipedia.org/wiki/MIPS_architecture#Calling_conventions
[Longsoon]: https://en.wikipedia.org/wiki/Loongson
[x32]: https://en.wikipedia.org/wiki/X32_ABI
2023-01-01 17:16:06 -08:00
Adam Joseph de88969f12 lib/systems: fix uname.processor for powerpc{32,64}, mips64
Cross-compilation of anything downstream of gtk3 requires qemu (due to
gobject-introspection) with --target-list=*-linux-user.  Without this commit,
those qemu builds will fail on a powerpc64le host due to qemu being configured
with --cpu=powerpc64le instead of --cpu=ppc64le.  Unfortunately the build
failure message from qemu in this situation is extremely cryptic.

The root cause turns out not to be the qemu expression, but rather the fact that
on powerpc64le hostPlatform.uname.processor returns the gnu-name (powerpc64le)
for the cpu instead of the linux-name (ppc64le) for the cpu.

uname.processor on mips64el also needs adjustment -- the Linux-name is "mips64"
for both big and little endian (unlike powerpc64, where the Linux-name includes
a "le" suffix):

```
nix@oak:/tmp$ uname -m; lscpu | head -n2
mips64
Architecture:        mips64
Byte Order:          Little Endian
```

uname.processor on powerpc32 has also been adjusted.
2023-01-01 16:20:50 -08:00
figsoda 695d4bc76b lib: fix typos 2022-12-17 18:59:29 -05:00
Sandro Jäckel c5923af986 lib/systems/architectures: expand inferiors 2022-11-29 01:45:05 +01:00
John Ericson 2cb8f1a0ac
Merge pull request #180964 from amjoseph-nixpkgs/pr/mkSkeletonFromList/simplify
lib/systems/parse.nix: mkSkeletonFromList: improve readability
2022-11-22 15:02:22 -05:00
Artturi 20fc948445
Merge pull request #170737 from amjoseph-nixpkgs/fix-mips32-detection
lib/systems/platforms.nix: fix broken mips32 detection
2022-11-21 19:40:18 +02:00
Adam Joseph 36a566b78f lib/systems/parse.nix: mkSkeletonFromList: improve readability
The main purpose of this PR is to make the basis for
`mkSkeletonFromList`'s decision between `cpu-kernel-libcabi` vs
`cpu-vendor-os` clear, without changing its behavior.  The existing
code obscures this decision behind a sequence of prioritized matches
(i.e. `if-then`) which jump around between different coordinates.

Two side benefits of this PR:

1. It makes the root cause of #165836 obvious: we are missing a case
   for `cpu-vendor-libcabi`.  This is why nixpkgs stumbles over
   `*-none-*`.

2. It illuminates some very weird corner cases in the existing
   logic, like `*-${vendor}-ghcjs` overriding the `vendor` field,
   and `mingw32` being transformed into `windows` in some cases.

Co-authored-by: John Ericson <git@JohnEricson.me>
2022-11-13 23:08:57 -08:00
John Ericson cd27a5b436
Merge pull request #82131 from Ericson2314/bsd-cross
FreeBSD packages: Init at 13.1
2022-11-13 21:35:17 -05:00
Jörg Thalheim 87f4f101d7 cross/mingw: fix emulator for mingw32 2022-11-06 20:29:37 +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
Ivan Nikolaenko f251840237 lib/systems/default.nix: add efiArch suffixes
Move already implemented functionality to the upper level so
it could be used in a more generic way.

Signed-off-by: Ivan Nikolaenko <ivan.nikolaenko@unikie.com>
2022-09-29 08:02:35 +00:00
Adam Joseph 66810822f9 lib/systems/inspect.nix: explanatory comment 2022-09-19 19:15:35 -07:00
Artturi d73864ae2f
Merge pull request #189314 from Artturin/addemulatoravailable 2022-09-13 21:13:07 +03:00
Artturin 20f90d3921 lib/systems: add emulatorAvailable
```
nix-repl> pkgsCross.arm-embedded.stdenv.hostPlatform.emulatorAvailable pkgsCross.arm-embedded.buildPackages
false

nix-repl> pkgsCross.aarch64-multiplatform.stdenv.hostPlatform.emulatorAvailable pkgsCross.aarch64-multiplatform.buildPackages
true
```

will be useful for stuff like handling https://github.com/NixOS/nixpkgs/issues/187109
2022-09-11 19:34:15 +03:00