diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-04 12:54:27 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-04 20:50:59 -0500 |
commit | 74cbb5796eef0469cc704bdcf6d271cc614bfd19 (patch) | |
tree | 9e0e0c80703465d897118c95180d14b1ddc83585 /pkgs/development/compilers/gcc/5 | |
parent | cabfe1885f0c4cd9c51828ffef0a358e15d06b00 (diff) | |
download | nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar.gz nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar.bz2 nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar.lz nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar.xz nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.tar.zst nixlib-74cbb5796eef0469cc704bdcf6d271cc614bfd19.zip |
gcc: Get rid of crossAttrs.configureFlags
Diffstat (limited to 'pkgs/development/compilers/gcc/5')
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 61 |
1 files changed, 10 insertions, 51 deletions
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 8eac7d16e408..f6a6a32ab9a1 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -104,12 +104,12 @@ let version = "5.4.0"; /* Platform flags */ platformFlags = let - gccArch = stdenv.platform.gcc.arch or null; - gccCpu = stdenv.platform.gcc.cpu or null; - gccAbi = stdenv.platform.gcc.abi or null; - gccFpu = stdenv.platform.gcc.fpu or null; - gccFloat = stdenv.platform.gcc.float or null; - gccMode = stdenv.platform.gcc.mode or null; + gccArch = targetPlatform.gcc.arch or null; + gccCpu = targetPlatform.gcc.cpu or null; + gccAbi = targetPlatform.gcc.abi or null; + gccFpu = targetPlatform.gcc.fpu or null; + gccFloat = targetPlatform.gcc.float or null; + gccMode = targetPlatform.gcc.mode or null; withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; @@ -387,7 +387,9 @@ stdenv.mkDerivation ({ ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} ${if !bootstrap then "--disable-bootstrap" else ""} ${if targetPlatform == hostPlatform then platformFlags else ""} - "; + " + optionalString + (hostPlatform != buildPlatform) + (platformFlags + " --target=${targetPlatform.config}"); targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; @@ -400,18 +402,7 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - crossAttrs = let - xgccArch = targetPlatform.gcc.arch or null; - xgccCpu = targetPlatform.gcc.cpu or null; - xgccAbi = targetPlatform.gcc.abi or null; - xgccFpu = targetPlatform.gcc.fpu or null; - xgccFloat = targetPlatform.gcc.float or null; - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; - in { + crossAttrs = { AR_FOR_BUILD = "ar"; AS_FOR_BUILD = "as"; LD_FOR_BUILD = "ld"; @@ -453,38 +444,6 @@ stdenv.mkDerivation ({ # If we are making a cross compiler, cross != null NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; dontStrip = true; - configureFlags = '' - ${if enableMultilib then "" else "--disable-multilib"} - ${if enableShared then "" else "--disable-shared"} - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} - --with-gmp=${gmp.crossDrv} - --with-mpfr=${mpfr.crossDrv} - --with-mpc=${libmpc.crossDrv} - --disable-libstdcxx-pch - --without-included-gettext - --with-system-zlib - --enable-languages=${ - concatStrings (intersperse "," - ( optional langC "c" - ++ optional langCC "c++" - ++ optional langFortran "fortran" - ++ optional langJava "java" - ++ optional langAda "ada" - ++ optional langVhdl "vhdl" - ++ optional langGo "go" - ) - ) - } - ${if langAda then " --enable-libada" else ""} - --target=${targetPlatform.config} - ${xwithArch} - ${xwithCpu} - ${xwithAbi} - ${xwithFpu} - ${xwithFloat} - ''; buildFlags = ""; }; |