mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
gcc: Get rid of crossAttrs.configureFlags
This commit is contained in:
parent
cabfe1885f
commit
74cbb5796e
7 changed files with 86 additions and 339 deletions
|
@ -63,6 +63,28 @@ let version = "4.5.4";
|
||||||
|
|
||||||
javaAwtGtk = langJava && gtk2 != null;
|
javaAwtGtk = langJava && gtk2 != null;
|
||||||
|
|
||||||
|
/* Platform flags */
|
||||||
|
platformFlags = let
|
||||||
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
||||||
|
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
||||||
|
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
||||||
|
in
|
||||||
|
withArch +
|
||||||
|
withCpu +
|
||||||
|
withAbi +
|
||||||
|
withFpu +
|
||||||
|
withFloat +
|
||||||
|
withMode;
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Cross-gcc settings */
|
||||||
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform;
|
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform;
|
||||||
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatformt;
|
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatformt;
|
||||||
|
@ -268,7 +290,10 @@ stdenv.mkDerivation ({
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
";
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -314,36 +339,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
|
||||||
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
${if targetplatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -98,12 +98,12 @@ let version = "4.8.5";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -366,7 +366,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -379,18 +381,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -432,39 +423,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,12 +100,12 @@ let version = "4.9.4";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -372,7 +372,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -385,18 +387,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -438,39 +429,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -104,12 +104,12 @@ let version = "5.4.0";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -387,7 +387,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -400,18 +402,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -453,38 +444,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,12 +100,12 @@ let version = "6.3.0";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -369,7 +369,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -382,18 +384,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -435,38 +426,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,12 +100,12 @@ let version = "7.1.0";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -370,7 +370,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -383,18 +385,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -436,38 +427,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,12 +100,12 @@ let version = "7-20170409";
|
||||||
|
|
||||||
/* Platform flags */
|
/* Platform flags */
|
||||||
platformFlags = let
|
platformFlags = let
|
||||||
gccArch = stdenv.platform.gcc.arch or null;
|
gccArch = targetPlatform.gcc.arch or null;
|
||||||
gccCpu = stdenv.platform.gcc.cpu or null;
|
gccCpu = targetPlatform.gcc.cpu or null;
|
||||||
gccAbi = stdenv.platform.gcc.abi or null;
|
gccAbi = targetPlatform.gcc.abi or null;
|
||||||
gccFpu = stdenv.platform.gcc.fpu or null;
|
gccFpu = targetPlatform.gcc.fpu or null;
|
||||||
gccFloat = stdenv.platform.gcc.float or null;
|
gccFloat = targetPlatform.gcc.float or null;
|
||||||
gccMode = stdenv.platform.gcc.mode or null;
|
gccMode = targetPlatform.gcc.mode or null;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
@ -370,7 +370,9 @@ stdenv.mkDerivation ({
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
${if targetPlatform == hostPlatform then platformFlags else ""}
|
${if targetPlatform == hostPlatform then platformFlags else ""}
|
||||||
";
|
" + optionalString
|
||||||
|
(hostPlatform != buildPlatform)
|
||||||
|
(platformFlags + " --target=${targetPlatform.config}");
|
||||||
|
|
||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
|
@ -383,18 +385,7 @@ stdenv.mkDerivation ({
|
||||||
then "install-strip"
|
then "install-strip"
|
||||||
else "install";
|
else "install";
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
xgccArch = targetPlatform.gcc.arch or null;
|
|
||||||
xgccCpu = targetPlatform.gcc.cpu or null;
|
|
||||||
xgccAbi = targetPlatform.gcc.abi or null;
|
|
||||||
xgccFpu = targetPlatform.gcc.fpu or null;
|
|
||||||
xgccFloat = targetPlatform.gcc.float or null;
|
|
||||||
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
|
||||||
in {
|
|
||||||
AR_FOR_BUILD = "ar";
|
AR_FOR_BUILD = "ar";
|
||||||
AS_FOR_BUILD = "as";
|
AS_FOR_BUILD = "as";
|
||||||
LD_FOR_BUILD = "ld";
|
LD_FOR_BUILD = "ld";
|
||||||
|
@ -436,38 +427,6 @@ stdenv.mkDerivation ({
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
configureFlags = ''
|
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
|
||||||
${if enableShared then "" else "--disable-shared"}
|
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
|
||||||
--with-gmp=${gmp.crossDrv}
|
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
|
||||||
--without-included-gettext
|
|
||||||
--with-system-zlib
|
|
||||||
--enable-languages=${
|
|
||||||
concatStrings (intersperse ","
|
|
||||||
( optional langC "c"
|
|
||||||
++ optional langCC "c++"
|
|
||||||
++ optional langFortran "fortran"
|
|
||||||
++ optional langJava "java"
|
|
||||||
++ optional langAda "ada"
|
|
||||||
++ optional langVhdl "vhdl"
|
|
||||||
++ optional langGo "go"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
${if langAda then " --enable-libada" else ""}
|
|
||||||
--target=${targetPlatform.config}
|
|
||||||
${xwithArch}
|
|
||||||
${xwithCpu}
|
|
||||||
${xwithAbi}
|
|
||||||
${xwithFpu}
|
|
||||||
${xwithFloat}
|
|
||||||
'';
|
|
||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue