3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development
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
..
androidndk-pkgs cc-wrapper: make machine configuration configurable 2019-04-20 20:05:51 -04:00
arduino
beam-modules buildMix: fix bootstrapping packages with hyphens in version 2019-04-18 22:37:30 +03:00
bower-modules/generic
compilers Merge pull request #56406 from TomSmeets/emscripten-1_38_28 2019-04-18 10:52:49 -04:00
coq-modules
dhall-modules
dotnet-modules/patches
em-modules/generic
go-modules
go-packages
guile-modules
haskell-modules
idris-modules
interpreters Merge pull request #59897 from matthewbauer/mb-cross-fixes2 2019-04-20 16:52:26 -04:00
java-modules
libraries Merge remote-tracking branch 'origin/master' into staging 2019-04-20 19:31:35 -04:00
lisp-modules
lua-modules
misc
mobile
node-packages
ocaml-modules
perl-modules
pharo
pure-modules
python-modules Merge branch 'master' into staging 2019-04-20 12:49:01 +02:00
r-modules
ruby-modules
tools cargo-expand: 0.4.10 -> 0.4.11 2019-04-20 14:21:11 +08:00
web