Merge branch 'master' into staging
Need base branch for GCC PR
This commit is contained in:
commit
a1e1e437df
|
@ -18,7 +18,6 @@ rec {
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.sheevaplug;
|
platform = platforms.sheevaplug;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
raspberryPi = rec {
|
raspberryPi = rec {
|
||||||
|
@ -31,7 +30,6 @@ rec {
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.raspberrypi;
|
platform = platforms.raspberrypi;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform = rec {
|
armv7l-hf-multiplatform = rec {
|
||||||
|
@ -44,7 +42,6 @@ rec {
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.armv7l-hf-multiplatform;
|
platform = platforms.armv7l-hf-multiplatform;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
aarch64-multiplatform = rec {
|
aarch64-multiplatform = rec {
|
||||||
|
@ -54,23 +51,20 @@ rec {
|
||||||
withTLS = true;
|
withTLS = true;
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.aarch64-multiplatform;
|
platform = platforms.aarch64-multiplatform;
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
scaleway-c1 = armv7l-hf-multiplatform // rec {
|
scaleway-c1 = armv7l-hf-multiplatform // rec {
|
||||||
platform = platforms.scaleway-c1;
|
platform = platforms.scaleway-c1;
|
||||||
inherit (platform) gcc;
|
inherit (platform.gcc) fpu;
|
||||||
inherit (gcc) fpu;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pogoplug4 = rec {
|
pogoplug4 = rec {
|
||||||
arch = "armv5tel";
|
arch = "armv5tel";
|
||||||
config = "armv5tel-softfloat-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
float = "soft";
|
float = "soft";
|
||||||
|
|
||||||
platform = platforms.pogoplug4;
|
platform = platforms.pogoplug4;
|
||||||
|
|
||||||
inherit (platform) gcc;
|
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
|
|
||||||
withTLS = true;
|
withTLS = true;
|
||||||
|
@ -86,7 +80,6 @@ rec {
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.fuloong2f_n32;
|
platform = platforms.fuloong2f_n32;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -63,16 +63,26 @@ let version = "4.5.4";
|
||||||
|
|
||||||
javaAwtGtk = langJava && gtk2 != null;
|
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 */
|
/* 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");
|
crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt");
|
||||||
|
|
||||||
crossConfigureFlags =
|
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.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -288,7 +298,7 @@ stdenv.mkDerivation ({
|
||||||
# Ada
|
# Ada
|
||||||
optional langAda "--enable-libada" ++
|
optional langAda "--enable-libada" ++
|
||||||
|
|
||||||
# Cross-compilation
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
|
@ -299,52 +309,49 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -108,13 +108,13 @@ let version = "4.8.5";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -127,8 +127,6 @@ let version = "4.8.5";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -382,7 +380,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -406,59 +404,49 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
/* For cross-built gcc (build != host == target) */
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
crossAttrs = {
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
NM_FOR_BUILD = "nm";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -99,13 +99,13 @@ let version = "4.9.4";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -118,8 +118,6 @@ let version = "4.9.4";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -380,7 +378,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -405,59 +403,48 @@ stdenv.mkDerivation ({
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
/* For cross-built gcc (build != host == target) */
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
NM_FOR_BUILD = "nm";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -103,13 +103,13 @@ let version = "5.5.0";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -122,8 +122,6 @@ let version = "5.5.0";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -390,7 +388,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -415,58 +413,48 @@ stdenv.mkDerivation ({
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
/* For cross-built gcc (build != host == target) */
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
NM_FOR_BUILD = "nm";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -100,13 +100,13 @@ let version = "6.4.0";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -119,8 +119,6 @@ let version = "6.4.0";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -391,7 +389,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -415,58 +413,48 @@ stdenv.mkDerivation ({
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
/* For cross-built gcc (build != host == target) */
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
NM_FOR_BUILD = "nm";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -98,13 +98,13 @@ let version = "7.2.0";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -117,8 +117,6 @@ let version = "7.2.0";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -384,7 +382,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -409,58 +407,48 @@ stdenv.mkDerivation ({
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
/* For cross-built gcc (build != host == target) */
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
NM_FOR_BUILD = "nm";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
, x11Support ? langJava
|
, x11Support ? langJava
|
||||||
, gnatboot ? null
|
, gnatboot ? null
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? false
|
, crossStageStatic ? false
|
||||||
|
@ -98,13 +98,13 @@ let version = "7-20170409";
|
||||||
javaAwtGtk = langJava && x11Support;
|
javaAwtGtk = langJava && x11Support;
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
mkPlatformFlags = platform: let
|
platformFlags = let
|
||||||
gccArch = platform.gcc.arch or null;
|
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||||
gccCpu = platform.gcc.cpu or null;
|
gccCpu = targetPlatform.platform.gcc.cpu or null;
|
||||||
gccAbi = platform.gcc.abi or null;
|
gccAbi = targetPlatform.platform.gcc.abi or null;
|
||||||
gccFpu = platform.gcc.fpu or null;
|
gccFpu = targetPlatform.platform.gcc.fpu or null;
|
||||||
gccFloat = platform.gcc.float or null;
|
gccFloat = targetPlatform.platform.gcc.float or null;
|
||||||
gccMode = platform.gcc.mode or null;
|
gccMode = targetPlatform.platform.gcc.mode or null;
|
||||||
in
|
in
|
||||||
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
optional (gccArch != null) "--with-arch=${gccArch}" ++
|
||||||
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
|
||||||
|
@ -117,8 +117,6 @@ let version = "7-20170409";
|
||||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
mkPlatformFlags targetPlatform ++
|
|
||||||
|
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
[ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
|
||||||
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
"--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
|
||||||
|
@ -371,7 +369,7 @@ stdenv.mkDerivation ({
|
||||||
in "--with-native-system-header-dir=${incDir}"
|
in "--with-native-system-header-dir=${incDir}"
|
||||||
) ++
|
) ++
|
||||||
|
|
||||||
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
|
platformFlags ++
|
||||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
|
@ -396,58 +394,48 @@ stdenv.mkDerivation ({
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
/* For cross-built gcc (build != host == target) */
|
/* For cross-built gcc (build != host == target) */
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
AR_FOR_BUILD = "ar";
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
AS_FOR_BUILD = "as";
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
LD_FOR_BUILD = "ld";
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
NM_FOR_BUILD = "nm";
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
in {
|
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";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
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";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
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++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
|
||||||
dontStrip = true;
|
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 = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue