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 | |
parent | bc23afe5c7fd9095b1e49fccc51a42a18dd220c4 (diff) | |
download | nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.gz nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.bz2 nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.lz nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.xz nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.tar.zst nixlib-114a9b625386e3ca4e142dce6ce8bcfcabea8fe3.zip |
gcc: Let cc-wrapper's setup hook define any tool env vars we need
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/4.5/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 47 |
7 files changed, 6 insertions, 323 deletions
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 9f8a3bd6fb6f..23dcacd837dc 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -315,56 +315,9 @@ 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; }; - NIX_BUILD_BINTOOLS = buildPackages.stdenv.cc.bintools; - NIX_BUILD_CC = buildPackages.stdenv.cc; - - # Needed for the cross compilation to work - AR = "ar"; - LD = "ld"; - CC = "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. # diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 65f95846f02b..c828b7776adc 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -398,57 +398,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. diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 5cc6dbffd151..7aa5610b5395 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -396,57 +396,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. diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index f109d20f5736..3a7ad0a4c590 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -404,57 +404,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. diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index d9e1a71ae3af..894abdb43fbc 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. diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 76a636bb2dc8..09e111f37fb7 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -400,57 +400,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. diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 4857eb5e517c..955347809775 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -387,57 +387,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. |