gcc: Factor out "platform flags"
This commit is contained in:
@@ -98,22 +98,6 @@ let version = "7.3.0";
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* 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 (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
@@ -396,7 +380,7 @@ stdenv.mkDerivation ({
|
||||
# Ada
|
||||
optional langAda "--enable-libada" ++
|
||||
|
||||
platformFlags ++
|
||||
(import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user