nixpkgs/pkgs/build-support
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
..
agda agda: use exec in agdaWrapper 2018-12-07 21:37:19 -05:00
appimage appimage-run: add libtool 2019-04-20 12:32:17 +02:00
bintools-wrapper Merge branch 'master' into staging 2019-04-05 11:37:15 +02:00
build-bazel-package bazel-remote: init at 2019-01-12 2019-03-11 11:10:59 +01:00
build-dotnet-package treewide: Manual fix more pkg-config build-inputs 2017-09-21 15:49:54 -04:00
build-fhs-userenv nixos/fhsUserenv: make all locales available 2019-04-02 22:45:50 +02:00
build-setupcfg Revert "buildSetupcfg: Include unzip for zip sources." 2018-04-14 20:12:22 -04:00
buildenv Merge #55420: buildEnv, substituteAll: disable binary cache 2019-02-22 13:57:01 +01:00
cc-wrapper cc-wrapper: make machine configuration configurable 2019-04-20 20:05:51 -04:00
docker treewide: fixup bcf54ce 2019-04-12 09:09:22 +02:00
dotnetbuildhelpers
dotnetenv [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
emacs emacs: Link subdirs.el into emacs-packages-deps 2019-02-02 15:37:13 +02:00
expand-response-params expand-response-params: Build more normally 2017-08-25 15:10:02 -04:00
fetchbitbucket all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00
fetchbower Merge remote-tracking branch 'upstream/master' into staging 2018-01-14 21:18:27 +02:00
fetchbzr treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchcvs bsd: init netbsd & openbsd userland 2018-04-24 14:16:35 -05:00
fetchdarcs pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchdocker Merge branch 'no-toPath' 2018-09-06 08:09:53 -04:00
fetchfossil treewide: Fixed output fetch* derivations should use nativeBuildInputs 2018-01-09 20:14:46 -05:00
fetchgit prefer-fetch-remote: an overlay to fetch on remote builders 2019-01-18 14:41:10 +00:00
fetchgithub all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00
fetchgitlab all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00
fetchgitlocal pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchgx Merge remote-tracking branch 'upstream/master' into staging 2018-01-14 21:18:27 +02:00
fetchhg prefer-fetch-remote: an overlay to fetch on remote builders 2019-01-18 14:41:10 +00:00
fetchipfs prefer-fetch-remote: an overlay to fetch on remote builders 2019-01-18 14:41:10 +00:00
fetchmavenartifact fetchMavenArtifact: prevent leaking nix hash to jar name 2017-06-25 12:25:16 +00:00
fetchmtn treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchnuget pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchpatch fetchpatch: patchutils -> buildPackages.patchutils 2018-08-21 17:21:25 -04:00
fetchrepoorcz all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00
fetchrepoproject treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
fetchs3 pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchsavannah all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00
fetchsvn fetchsvn: move defaults to package file 2019-02-03 15:33:14 +00:00
fetchsvnrevision
fetchsvnssh fetchsvnssh: move defaults to package file 2019-02-03 15:30:27 +00:00
fetchurl haskell: add more hackage mirrors, use mirrors in more places 2019-04-05 13:51:56 -04:00
fetchzip fetchzip: Use unzip from buildPackages 2018-09-21 12:55:32 -04:00
icon-conv-tools
kernel make-initrd: allow specifying name 2019-04-13 23:20:58 +02:00
libredirect libredirect: set install_name on Darwin 2018-11-14 00:05:26 +01:00
make-desktopitem make-desktopitem: make genericName optional 2017-06-05 21:55:23 -05:00
make-startupitem make-autostartitem: Use the right path for storing the desktop files 2017-07-06 00:44:41 +02:00
make-symlinks
mkshell mkShell: add builder (#30975) 2017-12-20 23:42:07 +00:00
mono-dll-fixer
nix-gitignore nix-gitignore: init at v3.0.0 (#46112) 2019-02-18 09:57:30 +00:00
nix-prefetch-github nix-prefetch-github: 2.1 -> 2.2 2019-02-28 22:02:54 +01:00
nuke-references
ocaml ocamlPackages.buildDunePackage: fix meta.platforms 2018-11-30 16:19:03 +00:00
prefer-remote-fetch prefer-fetch-remote: an overlay to fetch on remote builders 2019-01-18 14:41:10 +00:00
references-by-popularity references-by-popularity: cache computation to avoid memory bloat 2019-03-05 16:37:52 -05:00
release treewide: use runtimeShell instead of stdenv.shell whenever possible 2019-02-26 14:10:49 +00:00
remove-references-to
rust Merge master into staging-next 2019-04-09 16:38:35 +02:00
setup-hooks Merge remote-tracking branch 'origin/master' into staging 2019-03-21 21:01:25 -07:00
singularity-tools treewide: use runtimeShell instead of stdenv.shell whenever possible 2019-02-26 14:10:49 +00:00
skaware build-support/skaware: factor out clean packaging utils 2019-02-25 10:34:16 +01:00
src-only
substitute substituteAll: allowSubstitutes = false; 2019-02-07 22:20:42 +00:00
substitute-files substituteAllFiles: allowSubstitutes = false 2019-02-08 00:22:51 +00:00
templaterpm Compare to None using identity is operator 2018-10-30 21:30:56 +01:00
upstream-updater
vm treewide: use runtimeShell instead of stdenv.shell whenever possible 2019-02-26 14:10:49 +00:00
wrapper-common {bintools,cc}-wrapper: Factor out role accumulation logic 2018-05-07 15:10:45 -04:00
writers nixos/nginx: fix error in writeNginxConfig 2019-04-08 16:44:23 +03:00
build-maven.nix buildMaven: Support metadata-only dependencies 2018-11-29 17:29:59 +00:00
build-pecl.nix Revert "fix phpPackages memcache,memcached,xdebug" 2017-12-10 12:12:43 +01:00
closure-info.nix nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
dhall-to-nix.nix
plugins.nix Ultrastar (#26524) 2017-06-14 11:29:31 +02:00
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix trivial-builders: Fix runCommand examples 2019-04-19 06:29:42 +02:00