Commit Graph

153 Commits

Author SHA1 Message Date
Vladimír Čunát
5effa4e0f9
Merge branch 'master' into staging-next
Comments on conflicts:
- llvm: d6f401e1 vs. 469ecc70 - docs for 6 and 7 say the default is
  to build all targets, so we should be fine
- some pypi hashes: they were equivalent, just base16 vs. base32
2019-02-01 09:22:29 +01:00
Matthew Bauer
bf041c3f1d
systems/default.nix: wasm in platform.uname.system
This adds the "Wasm" system to platform.uname.system. This is used in CMake infrastructure.
2019-01-27 17:29:23 -05:00
Daniel Goertzen
1c10efc912 add generic x86_32 support (#52634)
* add generic x86_32 support

- Add support for i386-i586.
- Add `isx86_32` predicate that can replace most uses of `isi686`.
- `isi686` is reinterpreted to mean "exactly i686 arch, and not say i585 or i386".
- This branch was used to build working i586 kernel running on i586 hardware.

* revert `isi[345]86`, remove dead code

- Remove changes to dead code in `doubles.nix` and `for-meta.nix`.
- Remove `isi[345]86` predicates since other cpu families don't have specific model predicates.

* remove i386-linux since linux not supported on that cpu
2019-01-06 12:57:36 -06:00
Vladimír Čunát
d84a33d85b
Merge branch 'master' into staging-next
A few more rebuilds (~1k on x86_64-linux).
2019-01-05 15:02:04 +01:00
John Ericson
3bf0e4efc7 lib: Fix Mingw on 32-bit ARM 2019-01-04 12:05:35 -05:00
Jan Tojnar
c45e9d0fac
Merge branch 'master' into staging 2018-12-25 17:03:57 +01:00
Sander van der Burg
51428627eb Initial attempt to restore Android NDK cross building 2018-12-18 22:58:12 +01:00
Jörg Thalheim
554851e689
platform.emulator: fix non-x86 systems 2018-12-12 08:00:07 +00:00
Matthew Bauer
3b32c920d5 systems/parse.nix: support eabihf
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
2018-12-02 19:49:36 -06:00
Matthew Bauer
f435272ce3
Merge pull request #50212 from matthewbauer/host-emulator
Add "emulator" function to systems
2018-11-29 19:34:20 -06:00
Matthew Bauer
9c8fd41224 treewide: add emulator to platform
You can use stdenv.hostPlatform.emulator to get an executable that
runs cross-built binaries. This could be any emulator. For instance,
we use QEMU to emulate Linux targets and Wine to emulate Windows
targets. To work with qemu, we need to support custom targets.

I’ve reworked the cross tests in pkgs/test/cross to use this
functionality.

Also, I’ve used talloc to cross-execute with the emulator. There
appears to be a cross-execute for all waf builds. In the future, it
would be nice to set this for all waf builds.

Adds stdenv.hostPlatform.qemuArch attrbute to get the qemuArch for
each platform.
2018-11-29 19:15:30 -06:00
Matthew Bauer
ce6d558c4d systems/examples.nix: move riscv function to let binding
Makes it easier to use mapAttrs with lib.systems.examples. Now every
entry in it are legitimate systems.
2018-11-29 19:15:28 -06:00
Matthew Bauer
4b00cfe77f systems/parse: add older x86 architectures
i386, i486, i586 are added. These may have issues as many places
assume i686 is the only valid 32 bit x86 architecture.
2018-11-21 09:38:10 -06:00
Vincent Weisner
e7d2ea13e1
lib/systems: Added missing semicolons 2018-11-09 09:08:28 -05:00
Vincent Weisner
84810a1ba0
lib/system: Added Embedded Platforms for the CPUs
I added some embedded platforms for the CPUs I added to the parse.nix file.
These could be used as new platforms for the added CPUs.
2018-11-09 09:06:31 -05:00
Vincent Weisner
0607adde1a
Update parse.nix 2018-11-02 09:38:47 -04:00
Jörg Thalheim
aa75ebdcd3
CPU Fix
Co-Authored-By: vincrusher <vincentweisner@icloud.com>
2018-11-01 11:14:18 -04:00
Vincent Weisner
f9aaf7134b
Update parse.nix 2018-11-01 10:00:55 -04:00
John Ericson
4c48da246f
Merge pull request #49567 from obsidiansystems/arm-auto-detect
lib.systems.platforms: Add more ARM autodetection
2018-10-31 21:21:14 -04:00
John Ericson
aa964c82d3 lib.systems.platforms: Add more ARM autodetection 2018-10-31 19:04:06 -04:00
Matthew Bauer
2634d37617 systems/examples: add i686 & x86-64 embedded
Fixes #28160
2018-10-30 13:46:01 -05:00
Matthew Bauer
52dbd3380e systems/parse.nix: support weird system configs
There are some weird ones out there that don’t follow any pattern:

- arm-none-eabi
- powerpc-none-eabi
- aarch64-none-elf
2018-10-29 14:34:10 -05:00
Matthew Bauer
412093994b gcc: support avr
- respect libc’s incdir and libdir
- make non-unix systems single threaded
- set LIMITS_H_TEST to false for avr
- misc updates to support new libc’s
- use multilib with avr

For threads we want to use:
- posix on unix systems
- win32 on windows
- single on everything else

For avr:
- add library directories for avrlibc
- to disable relro and bind
- avr5 should have precedence over avr3 - otherwise gcc uses the wrong one
2018-10-29 14:34:09 -05:00
Matthew Bauer
72e3b2a662 systems: add avrlibc for avr systems 2018-10-29 14:34:09 -05:00
Matthew Bauer
d59a9ac7cf avr: use new compilation infrastructure
Gets rid of:
  avrbinutils
  avrgcc

to replace with:
  pkgsCross.avr.buildPackages.binutils
  pkgsCross.avr.buildPackages.gcc
2018-10-29 14:34:09 -05:00
Matthew Bauer
4a12a9321c tests/systems.nix: fix tests
these weren’t being run correctly
2018-10-18 14:12:49 -05:00
Matthew Bauer
c8040003f0 Correctly set windows doubles
mingw is the toolchain name but it is actually run on a window kernel
2018-10-17 17:03:00 -05:00
Matthew Bauer
45cc6e2a42 lib/systems: use lookup for uname.system
This is a little bit cleaner and avoids the if ... else if ... chain.
2018-10-17 14:43:49 -05:00
Matthew Bauer
8652631b13 systems/doubles.nix: add mingw doubles
this makes it easier to show what supports windows vs. unix.
2018-10-16 21:56:58 -05:00
Matthew Bauer
0e0894c37d lib/systems: add uname attrs 2018-10-16 21:48:43 -05:00
Ben Wolsieffer
50e947f529 lib/systems: use correct config for armv7l-hf-multiplatform 2018-10-06 01:01:07 -04:00
John Ericson
6769437186 androidndk: Add Darwin support
Also switch Linux to using the official sha1 hashes for consistency.
They are gotten from https://developer.android.com/ndk/downloads/.
2018-09-17 22:34:37 -04:00
Jörg Thalheim
9efffe0135 hurd: cleanup unmaintained target
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.
2018-08-28 22:18:02 +01:00
CrystalGamma
72d161f548 [RFC] ppc64le enablement (#45340)
* 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
2018-08-21 15:31:34 -04:00
Matthew Bauer
a22797d356 systems: fix netbsd triple parsing
binutils expects x86_64-unknown-netbsd<version> (only 3 parts!). Any other combo seems to fail.

Also handle darwin versions similarly.

/cc @Ericson2314
2018-07-28 19:54:09 -04:00
John Q Crosscompiler
7cc62144b2
systems: Allow detection of powerpc and sparc 2018-07-26 09:33:36 -04:00
Matthew Bauer
0bfffbc5e1 xcode: add xcodePlatform to system
This give us a little bit more control over what target we are using.
Eventually we can target other things like WatchOS or MacOS.
2018-06-25 22:18:23 -04:00
Matthew Bauer
9b0b31d981 xcode: add xcodeVer to system
This version number controls which xcode version to use when building
cross to iOS.
2018-06-25 21:57:24 -04:00
Matthew Bauer
c8fd285c8d android: add ndkVer to resolve ndk ambiguity
It wasn’t exactly clear which NDK you were using previously. This adds
an attribute to system that handles what version of the NDK we should
use when building things.

/cc @Ericson2314
2018-06-22 11:06:17 -04:00
Matthew Bauer
cf09ffe9aa android: Use NDK 17 for aarch32 2018-06-22 09:33:25 -04:00
Ben Wolsieffer
7cb01d58b2 platforms/raspberrypi: enable kernelAutoModules 2018-06-12 20:44:23 +03:00
Tuomas Tynkkynen
e864247f08 Merge branch 'plat-fix-for-merge-2' into master 2018-06-01 20:08:08 +03:00
Tuomas Tynkkynen
27bb4da344 platforms.nix: More rpi2 cleanup 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
3abdd4f1e3 platforms.nix: Clean up obsolete cruft from raspberrypi2 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
db2988f7bd platforms.nix: Clean up obsolete cruft from raspberrypi
Works fine without, and the 'DRM n' is actually preventing the mainline
VC4 driver from building.
2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
96edbe4a0e linux_rpi: Specify defconfig in kernel expression
In particular, now the mainline kernel can be built on the RPi 1 as well
(so kernelBaseConfig should always be a mainline defconfig from now on).
And RPi 2 users can now use linux_rpi without doing the
`nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;` dance.
2018-05-31 18:06:09 +03:00
John Ericson
72fa40f72d lib: Fix nix-env -qaP -f . --xml --meta
A merge undid my fix in d437f2c365.
2018-05-29 13:06:17 -04:00
Jan Malakhovski
ad35019501 Merge branch 'master' into staging
Fixed conflicts:
- lib/systems/for-meta.nix: in favor of staging
- pkgs/os-specific/darwin/xcode/default.nix: in favor of master
2018-05-26 00:20:17 +00:00
John Ericson
d437f2c365 lib: Fix nix-env -qaP -f . --xml --meta
The function value cannot be serialized so nix-env was mad. Turns out we can
just remove it like we do in `lib/systems/inspect.nix`.
2018-05-24 10:43:14 -04:00
Tuomas Tynkkynen
003473613a Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/top-level/all-packages.nix
2018-05-18 03:54:38 +03:00