diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-08-18 13:58:48 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-30 22:04:21 -0500 |
commit | 114a9b625386e3ca4e142dce6ce8bcfcabea8fe3 (patch) | |
tree | db7b44edf88ea1df93960734afde27faef7144f8 /pkgs/development/compilers/gcc/6/default.nix | |
parent | bc23afe5c7fd9095b1e49fccc51a42a18dd220c4 (diff) | |
download | nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.gz nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.bz2 nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.lz nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.xz nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.zst nixpkgs-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.zip |
gcc: Let cc-wrapper's setup hook define any tool env vars we need
Diffstat (limited to 'pkgs/development/compilers/gcc/6/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index d9e1a71ae3a..894abdb43fb 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -406,57 +406,12 @@ stdenv.mkDerivation ({ /* For cross-built gcc (build != host == target) */ crossAttrs = { - AR_FOR_BUILD = "ar"; - AS_FOR_BUILD = "as"; - LD_FOR_BUILD = "ld"; - NM_FOR_BUILD = "nm"; - OBJCOPY_FOR_BUILD = "objcopy"; - OBJDUMP_FOR_BUILD = "objdump"; - RANLIB_FOR_BUILD = "ranlib"; - SIZE_FOR_BUILD = "size"; - STRINGS_FOR_BUILD = "strings"; - STRIP_FOR_BUILD = "strip"; - CC_FOR_BUILD = "gcc"; - CXX_FOR_BUILD = "g++"; - - AR = "${targetPlatform.config}-ar"; - AS = "${targetPlatform.config}-as"; - LD = "${targetPlatform.config}-ld"; - NM = "${targetPlatform.config}-nm"; - OBJCOPY = "${targetPlatform.config}-objcopy"; - OBJDUMP = "${targetPlatform.config}-objdump"; - RANLIB = "${targetPlatform.config}-ranlib"; - SIZE = "${targetPlatform.config}-size"; - STRINGS = "${targetPlatform.config}-strings"; - STRIP = "${targetPlatform.config}-strip"; - CC = "${targetPlatform.config}-gcc"; - CXX = "${targetPlatform.config}-g++"; - - AR_FOR_TARGET = "${targetPlatform.config}-ar"; - AS_FOR_TARGET = "${targetPlatform.config}-as"; - LD_FOR_TARGET = "${targetPlatform.config}-ld"; - NM_FOR_TARGET = "${targetPlatform.config}-nm"; - OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; - OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; - RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; - SIZE_FOR_TARGET = "${targetPlatform.config}-size"; - STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; - STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; - CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - dontStrip = true; buildFlags = ""; }; - NIX_BUILD_BINTOOLS = buildPackages.stdenv.cc.bintools; - NIX_BUILD_CC = buildPackages.stdenv.cc; - - # Needed for the cross compilation to work - AR = "ar"; - LD = "ld"; # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 - CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc"; + CC = if hostPlatform.system == "x86_64-solaris" then "gcc -m64" else "gcc"; # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the # library headers and binaries, regarless of the language being compiled. |