nixpkgs/lib/systems
Matthew Bauer d180cb9850 cc-wrapper: make machine configuration configurable
It is useful to make these dynamic and not bake them into gcc. This
means we don’t have to rebuild gcc to change these values. Instead, we
will pass cflags to gcc based on platform values. This was already
done hackily for android gcc (which is multi-target), but not for our
own gccs which are single target.

To accomplish this, we need to add a few things:

- add ‘arch’ to cpu
- add NIX_CFLAGS_COMPILE_BEFORE flag (goes before args)
- set -march everywhere
- set mcpu, mfpu, mmode, and mtune based on targetPlatform.gcc flags

cc-wrapper: only set -march when it is in the cpu type

Some architectures don’t have a good mapping of -march. For instance
POWER architecture doesn’t support the -march flag at all!

https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options
2019-04-20 20:05:51 -04:00
..
default.nix kernel-headers: infer ARCH from config triple 2019-04-19 14:53:48 -04:00
doubles.nix mesa: armv7a-linux supports mesa 2019-02-24 17:00:48 -05:00
examples.nix release-cross: remove alpha-elf target 2019-04-20 17:22:52 -04:00
for-meta.nix hurd: cleanup unmaintained target 2018-08-28 22:18:02 +01:00
inspect.nix systems: support TI MSP430 microcontrollers 2019-03-25 20:33:58 -07:00
parse.nix cc-wrapper: make machine configuration configurable 2019-04-20 20:05:51 -04:00
platforms.nix androidndk-pkgs: Remove -mfloat flag 2019-04-16 16:21:51 -04:00