diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index ff2273febcb..90d7e956d2b 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -18,7 +18,6 @@ rec { libc = "glibc"; platform = platforms.sheevaplug; openssl.system = "linux-generic32"; - inherit (platform) gcc; }; raspberryPi = rec { @@ -31,7 +30,6 @@ rec { libc = "glibc"; platform = platforms.raspberrypi; openssl.system = "linux-generic32"; - inherit (platform) gcc; }; armv7l-hf-multiplatform = rec { @@ -44,7 +42,6 @@ rec { libc = "glibc"; platform = platforms.armv7l-hf-multiplatform; openssl.system = "linux-generic32"; - inherit (platform) gcc; }; aarch64-multiplatform = rec { @@ -54,23 +51,20 @@ rec { withTLS = true; libc = "glibc"; platform = platforms.aarch64-multiplatform; - inherit (platform) gcc; }; scaleway-c1 = armv7l-hf-multiplatform // rec { platform = platforms.scaleway-c1; - inherit (platform) gcc; - inherit (gcc) fpu; + inherit (platform.gcc) fpu; }; pogoplug4 = rec { arch = "armv5tel"; - config = "armv5tel-softfloat-linux-gnueabi"; + config = "armv5tel-unknown-linux-gnueabi"; float = "soft"; platform = platforms.pogoplug4; - inherit (platform) gcc; libc = "glibc"; withTLS = true; @@ -86,7 +80,6 @@ rec { libc = "glibc"; platform = platforms.fuloong2f_n32; openssl.system = "linux-generic32"; - inherit (platform) gcc; }; # diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 088a64ff543..12739682292 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -63,16 +63,26 @@ let version = "4.5.4"; javaAwtGtk = langJava && gtk2 != null; + /* Platform flags */ + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; + in + optional (gccArch != null) "--with-arch=${gccArch}" ++ + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ + optional (gccFloat != null) "--with-float=${gccFloat}" ++ + optional (gccMode != null) "--with-mode=${gccMode}"; + /* Cross-gcc settings */ - gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform; - gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatform; - gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform; crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"); crossConfigureFlags = - optional (gccArch != null) "--with-arch=${gccArch}" ++ - optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ - optional (gccAbi != null) "--with-abi=${gccAbi}" ++ # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -288,7 +298,7 @@ stdenv.mkDerivation ({ # Ada optional langAda "--enable-libada" ++ - # Cross-compilation + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ # Platform-specific flags @@ -299,52 +309,49 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; + /* 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, cross != null NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - optional (ppl != null) "--with-ppl=${ppl.crossDrv}" ++ - optional (cloogppl != null) "--with-cloog=${cloogppl.crossDrv}" ++ - - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ - optional (targetPlatform != hostPlatform) crossConfigureFlags - ; }; diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index c0efbb78f3c..51fb1a1c9a1 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -108,13 +108,13 @@ let version = "4.8.5"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -127,8 +127,6 @@ let version = "4.8.5"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -382,7 +380,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -406,59 +404,49 @@ 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; - in { + /* 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index ca9d26e68fc..57d173c3a14 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -99,13 +99,13 @@ let version = "4.9.4"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -118,8 +118,6 @@ let version = "4.9.4"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -380,7 +378,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -405,59 +403,48 @@ stdenv.mkDerivation ({ else "install"; /* For cross-built gcc (build != host == target) */ - 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; - in { + 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 332dae95965..a34d14e8802 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -103,13 +103,13 @@ let version = "5.5.0"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -122,8 +122,6 @@ let version = "5.5.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -390,7 +388,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -415,58 +413,48 @@ stdenv.mkDerivation ({ else "install"; /* For cross-built gcc (build != host == target) */ - 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; - in { + 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index d9f4d35f4f8..61e7647f968 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -100,13 +100,13 @@ let version = "6.4.0"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -119,8 +119,6 @@ let version = "6.4.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -391,7 +389,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -415,58 +413,48 @@ stdenv.mkDerivation ({ else "install"; /* For cross-built gcc (build != host == target) */ - 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; - in { + 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 7335c784a95..48b245c1006 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -98,13 +98,13 @@ let version = "7.2.0"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -117,8 +117,6 @@ let version = "7.2.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -384,7 +382,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -409,58 +407,48 @@ stdenv.mkDerivation ({ else "install"; /* For cross-built gcc (build != host == target) */ - 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; - in { + 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; }; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 48840ffa7c2..981ac44d1b1 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -23,7 +23,7 @@ , x11Support ? langJava , gnatboot ? null , enableMultilib ? false -, enablePlugin ? true # whether to support user-supplied plug-ins +, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false @@ -98,13 +98,13 @@ let version = "7-20170409"; javaAwtGtk = langJava && x11Support; /* Platform flags */ - mkPlatformFlags = platform: let - gccArch = platform.gcc.arch or null; - gccCpu = platform.gcc.cpu or null; - gccAbi = platform.gcc.abi or null; - gccFpu = platform.gcc.fpu or null; - gccFloat = platform.gcc.float or null; - gccMode = platform.gcc.mode or null; + platformFlags = let + gccArch = targetPlatform.platform.gcc.arch or null; + gccCpu = targetPlatform.platform.gcc.cpu or null; + gccAbi = targetPlatform.platform.gcc.abi or null; + gccFpu = targetPlatform.platform.gcc.fpu or null; + gccFloat = targetPlatform.platform.gcc.float or null; + gccMode = targetPlatform.platform.gcc.mode or null; in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ @@ -117,8 +117,6 @@ let version = "7-20170409"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - # Ensure that -print-prog-name is able to find the correct programs. [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ @@ -371,7 +369,7 @@ stdenv.mkDerivation ({ in "--with-native-system-header-dir=${incDir}" ) ++ - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ + platformFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -396,58 +394,48 @@ stdenv.mkDerivation ({ else "install"; /* For cross-built gcc (build != host == target) */ - 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; - in { + 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}-gcc"; + CXX = "${targetPlatform.config}-g++"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + AS_FOR_TARGET = "${targetPlatform.config}-as"; LD_FOR_TARGET = "${targetPlatform.config}-ld"; - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 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++"; # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; - configureFlags = - optional (!enableMultilib) "--disable-multilib" ++ - optional (!enableShared) "--disable-shared" ++ - optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ - optional javaAwtGtk "--enable-java-awt=gtk" ++ - optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - [ - "--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" - ) - ) - }" - ] ++ - optional langAda "--enable-libada" ++ - optional (xgccArch != null) "--with-arch=${xgccArch}" ++ - optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ - optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ - optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ - optional (xgccFloat != null) "--with-float=${xgccFloat}" - ; buildFlags = ""; };