diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-11-14 18:32:50 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-11-14 18:32:50 -0500 |
commit | ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a (patch) | |
tree | 0a029bb7af1eb2397a4663faa51fd205cc528c1a | |
parent | 1c1207220f06b751a42346f33d09582e66999a6d (diff) | |
download | nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar.gz nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar.bz2 nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar.lz nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar.xz nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.tar.zst nixpkgs-ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a.zip |
gcc: Misc indentation and whitespace-in-string fixes
-rw-r--r-- | pkgs/development/compilers/gcc/4.5/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 129 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 137 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 128 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 124 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 129 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 129 |
7 files changed, 404 insertions, 400 deletions
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 69022c2aa3d..088a64ff543 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -74,8 +74,8 @@ let version = "4.5.4"; optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ optional (gccAbi != null) "--with-abi=${gccAbi}" ++ # Ensure that -print-prog-name is able to find the correct programs. - [ " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ (if crossMingw && crossStageStatic then [ "--with-headers=${libcCross}/include" "--with-gcc" @@ -88,19 +88,21 @@ let version = "4.5.4"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" - ] else if crossStageStatic then [ - "--disable-libssp --disable-nls" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" "--without-headers" "--disable-threads" "--disable-libmudflap" - "--disable-libgomp " + "--disable-libgomp" "--disable-shared" "--disable-decimal-float" # libdecnumber requires libc - ] else [ + ] else [ "--with-headers=${libcCross}/include" "--enable-__cxa_atexit" "--enable-long-long" - ] ++ (if crossMingw then [ + ] ++ + (if crossMingw then [ "--enable-threads=win32" "--enable-sjlj-exceptions" "--enable-hash-synchronization" @@ -108,12 +110,11 @@ let version = "4.5.4"; "--disable-libssp" "--disable-nls" "--with-dwarf2" - ] else [ + ] else [ "--enable-threads=posix" "--enable-nls" - "--disable-decimal-float" - ]) # No final libdecnumber (it may work only in 386) - ); + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -274,11 +275,12 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 7cba8296d83..7003ace2890 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -124,67 +124,65 @@ let version = "4.8.5"; optional (gccMode != null) "--with-mode=${gccMode}"; /* Cross-gcc settings (build == host != target) */ - /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then - [ "--disable-libssp --disable-nls" - "--without-headers" - "--disable-threads " - "--disable-libgomp " - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic " # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" - ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ] - ) - ); + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" + ] else + optionals (targetPlatform.libc == "uclibc") [ + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -347,7 +345,11 @@ stdenv.mkDerivation ({ # Optional features optional (isl != null) "--with-isl=${isl}" ++ - optional (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl" ++ + optionals (cloog != null) [ + "--with-cloog=${cloog}" + "--disable-cloog-version-check" + "--enable-cloog-backend=isl" + ] ++ (if enableMultilib then ["--enable-multilib" "--disable-libquadmath"] @@ -359,11 +361,12 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ @@ -386,9 +389,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals hostPlatform.isSunOS [ - "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - "--with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 98df530d884..362670ff5db 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -118,67 +118,65 @@ let version = "4.9.4"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then - [ "--disable-libssp" - "--disable-nls" - "--without-headers" - "--disable-threads " - "--disable-libgomp " - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic " # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # libsanitizer requires netrom/netrom.h which is not - # available in uclibc. - "--disable-libsanitizer" - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" - ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ]) - ); + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" + ] else + optionals (targetPlatform.libc == "uclibc") [ + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + "--disable-libsanitizer" + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -353,15 +351,20 @@ stdenv.mkDerivation ({ # Optional features optional (isl != null) "--with-isl=${isl}" ++ - optional (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl" ++ + optionals (cloog != null) [ + "--with-cloog=${cloog}" + "--disable-cloog-version-check" + "--enable-cloog-backend=isl" + ] ++ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ @@ -384,9 +387,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals hostPlatform.isSunOS [ - "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - "--with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; @@ -427,7 +430,7 @@ stdenv.mkDerivation ({ optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ - optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++ + optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++ [ "--with-gmp=${gmp.crossDrv}" "--with-mpfr=${mpfr.crossDrv}" diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index fe9735d1fd6..c9b49c0ede6 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -122,66 +122,65 @@ let version = "5.5.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then - [ "--disable-libssp --disable-nls" - "--without-headers" - "--disable-threads " - "--disable-libgomp " - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic " # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # libsanitizer requires netrom/netrom.h which is not - # available in uclibc. - "--disable-libsanitizer" - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" - ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ] - ) - ); + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" + ] else + optionals (targetPlatform.libc == "uclibc") [ + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + "--disable-libsanitizer" + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -370,11 +369,12 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ @@ -397,9 +397,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals hostPlatform.isSunOS [ - "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - "--with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index f0d2ab6a914..a68946a6f34 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -119,67 +119,65 @@ let version = "6.4.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then [ - "--disable-libssp" - "--disable-nls" - "--without-headers" - "--disable-threads" - "--disable-libgomp" - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # libsanitizer requires netrom/netrom.h which is not - # available in uclibc. - "--disable-libsanitizer" - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ]) - ); + optionals (targetPlatform.libc == "uclibc") [ + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + "--disable-libsanitizer" + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -372,7 +370,7 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. @@ -399,9 +397,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals (hostPlatform.isSunOS) [ - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - " --with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index e44b32ef9d3..c201ca6373b 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -117,67 +117,65 @@ let version = "7.2.0"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then - [ "--disable-libssp" - "--disable-nls" - "--without-headers" - "--disable-threads " - "--disable-libgomp " - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic " # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # libsanitizer requires netrom/netrom.h which is not - # available in uclibc. - "--disable-libsanitizer" - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" - ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ]) - ); + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" + ] else + optionals (targetPlatform.libc == "uclibc") [ + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + "--disable-libsanitizer" + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -365,11 +363,12 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ @@ -392,9 +391,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals hostPlatform.isSunOS [ - "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - "--with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index ed127effd7e..2e0a49957c0 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -117,67 +117,65 @@ let version = "7-20170409"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossConfigureFlags = - mkPlatformFlags targetPlatform ++ - - # Ensure that -print-prog-name is able to find the correct programs. - [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" - "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ - (if crossMingw && crossStageStatic then - [ "--with-headers=${libcCross}/include" - "--with-gcc" - "--with-gnu-as" - "--with-gnu-ld" - "--with-gnu-ld" - "--disable-shared" - "--disable-nls" - "--disable-debug" - "--enable-sjlj-exceptions" - "--enable-threads=win32" - "--disable-win32-registry" - ] else if crossStageStatic then - [ "--disable-libssp" - "--disable-nls" - "--without-headers" - "--disable-threads " - "--disable-libgomp " - "--disable-libquadmath" - "--disable-shared" - "--disable-libatomic " # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - ] else - (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"] - else ["--with-headers=${getDev libcCross}/include"]) ++ - [ "--enable-__cxa_atexit" - "--enable-long-long" - ] ++ - - (if crossMingw then [ - "--enable-threads=win32" - "--enable-sjlj-exceptions" - "--enable-hash-synchronization" - "--disable-libssp" - "--disable-nls" - "--with-dwarf2" - # I think noone uses shared gcc libs in mingw, so we better do the same. - # In any case, mingw32 g++ linking is broken by default with shared libs, - # unless adding "-lsupc++" to any linking command. I don't know why. - "--disable-shared" - # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" - ] else - optionals (targetPlatform.libc == "uclibc") [ - # libsanitizer requires netrom/netrom.h which is not - # available in uclibc. - "--disable-libsanitizer" - # In uclibc cases, libgomp needs an additional '-ldl' - # and as I don't know how to pass it, I disable libgomp. - "--disable-libgomp" - ] ++ - [ "--enable-threads=posix" - "--enable-nls" - "--disable-decimal-float" # No final libdecnumber (it may work only in 386) - ]) - ); + mkPlatformFlags targetPlatform ++ + + # Ensure that -print-prog-name is able to find the correct programs. + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ + (if crossMingw && crossStageStatic then [ + "--with-headers=${libcCross}/include" + "--with-gcc" + "--with-gnu-as" + "--with-gnu-ld" + "--with-gnu-ld" + "--disable-shared" + "--disable-nls" + "--disable-debug" + "--enable-sjlj-exceptions" + "--enable-threads=win32" + "--disable-win32-registry" + ] else if crossStageStatic then [ + "--disable-libssp" + "--disable-nls" + "--without-headers" + "--disable-threads" + "--disable-libgomp" + "--disable-libquadmath" + "--disable-shared" + "--disable-libatomic" # libatomic requires libc + "--disable-decimal-float" # libdecnumber requires libc + ] else [ + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" + else "--with-headers=${getDev libcCross}/include") + "--enable-__cxa_atexit" + "--enable-long-long" + ] ++ + (if crossMingw then [ + "--enable-threads=win32" + "--enable-sjlj-exceptions" + "--enable-hash-synchronization" + "--disable-libssp" + "--disable-nls" + "--with-dwarf2" + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + "--disable-shared" + # To keep ABI compatibility with upstream mingw-w64 + "--enable-fully-dynamic-string" + ] else + optionals (targetPlatform.libc == "uclibc") [ + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + "--disable-libsanitizer" + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + "--disable-libgomp" + ] ++ [ + "--enable-threads=posix" + "--enable-nls" + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) + ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; @@ -352,11 +350,12 @@ stdenv.mkDerivation ({ # Java options optionals langJava [ - "--with-ecj-jar=${javaEcj} " + "--with-ecj-jar=${javaEcj}" # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + "--enable-java-home" + "--with-java-home=\${prefix}/lib/jvm/jre" ] ++ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ @@ -379,9 +378,9 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ optionals hostPlatform.isSunOS [ - "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit" + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred - "--with-gnu-as --without-gnu-ld" + "--with-gnu-as" "--without-gnu-ld" ] ; |