diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/common/platform-flags.nix | 13 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 17 |
9 files changed, 27 insertions, 130 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 532c56d52573..fbeb649f96ac 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -99,22 +99,6 @@ let version = "4.8.5"; 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"; @@ -356,7 +340,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index f041252495a6..b8aebe6ed094 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -104,22 +104,6 @@ let version = "4.9.4"; 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"; @@ -378,7 +362,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index dee798eb09b1..8cbd85d9d198 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -94,22 +94,6 @@ let version = "5.5.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"; @@ -380,7 +364,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index b99ab8fce7fb..8985879977d3 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -88,22 +88,6 @@ let version = "6.4.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"; @@ -384,7 +368,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 493e50d9f327..d2fc25dad588 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -93,22 +93,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"; @@ -389,8 +373,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 2465e6149c0a..b7e209ebc0c8 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -54,22 +54,6 @@ let version = "8.1.0"; }) */ ++ optional langFortran ../gfortran-driving.patch; - /* 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"; @@ -331,7 +315,7 @@ stdenv.mkDerivation ({ # Optional features optional (isl != null) "--with-isl=${isl}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/compilers/gcc/common/platform-flags.nix b/pkgs/development/compilers/gcc/common/platform-flags.nix new file mode 100644 index 000000000000..e261f54f582d --- /dev/null +++ b/pkgs/development/compilers/gcc/common/platform-flags.nix @@ -0,0 +1,13 @@ +{ lib, targetPlatform }: + +let + p = targetPlatform.platform.gcc or {}; + float = p.float or (targetPlatform.parsed.abi.float or null); +in lib.concatLists [ + (lib.optional (p ? arch) "--with-arch=${p.arch}") + (lib.optional (p ? cpu) "--with-cpu=${p.cpu}") + (lib.optional (p ? abi) "--with-abi=${p.abi}") + (lib.optional (p ? fpu) "--with-fpu=${p.fpu}") + (lib.optional (float != null) "--with-float=${float}") + (lib.optional (p ? mode) "--with-mode=${p.mode}") +] diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index d37cfac3fa85..06e44d2868a1 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -86,22 +86,6 @@ let version = "7-20170409"; 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"; @@ -352,7 +336,7 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - platformFlags ++ + (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 37e0a20a957d..6c7ce8ba16f9 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -39,7 +39,6 @@ let version = "2.27"; patchSuffix = ""; sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; - cross = if buildPlatform != hostPlatform then hostPlatform else null; in assert withLinuxHeaders -> linuxHeaders != null; @@ -49,9 +48,6 @@ stdenv.mkDerivation ({ inherit version installLocales; linuxHeaders = if withLinuxHeaders then linuxHeaders else null; - # The host/target system. - crossConfig = if cross != null then cross.config else null; - inherit (stdenv) is64bit; enableParallelBuilding = true; @@ -123,11 +119,12 @@ stdenv.mkDerivation ({ else "--disable-profile") ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 - ] ++ lib.optionals (cross != null) [ - (if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp") - ] ++ lib.optionals (cross != null) [ + ] ++ lib.optionals (hostPlatform != buildPlatform) [ + (if hostPlatform.platform.gcc.float or (hostPlatform.parsed.abi.float or "hard") == "soft" + then "--without-fp" + else "--with-fp") "--with-__thread" - ] ++ lib.optionals (cross == null && stdenv.isAarch32) [ + ] ++ lib.optionals (hostPlatform == buildPlatform && hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" "--build=arm-linux-gnueabi" @@ -179,7 +176,7 @@ stdenv.mkDerivation ({ } - '' + lib.optionalString (cross != null) '' + '' + lib.optionalString (hostPlatform != buildPlatform) '' sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" cat > config.cache << "EOF" @@ -211,7 +208,7 @@ stdenv.mkDerivation ({ } // meta; } -// lib.optionalAttrs (cross != null) { +// lib.optionalAttrs (hostPlatform != buildPlatform) { preInstall = null; # clobber the native hook dontStrip = true; |