gcc: Misc indentation and whitespace-in-string fixes

This commit is contained in:
John Ericson 2017-11-14 18:32:50 -05:00
parent 1c1207220f
commit ab77a6bb1e
7 changed files with 398 additions and 394 deletions

View File

@ -89,7 +89,8 @@ let version = "4.5.4";
"--enable-threads=win32"
"--disable-win32-registry"
] else if crossStageStatic then [
"--disable-libssp --disable-nls"
"--disable-libssp"
"--disable-nls"
"--without-headers"
"--disable-threads"
"--disable-libmudflap"
@ -100,7 +101,8 @@ let version = "4.5.4";
"--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"
@ -111,9 +113,8 @@ let version = "4.5.4";
] 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 "";
@ -278,7 +279,8 @@ stdenv.mkDerivation ({
# 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}" ++

View File

@ -123,7 +123,6 @@ let version = "4.8.5";
optional (gccFloat != null) "--with-float=${gccFloat}" ++
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";
@ -133,8 +132,8 @@ let version = "4.8.5";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -145,8 +144,9 @@ let version = "4.8.5";
"--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-libgomp"
@ -154,10 +154,10 @@ let version = "4.8.5";
"--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"
] 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 [
@ -178,13 +178,11 @@ let version = "4.8.5";
# 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-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"]
@ -363,7 +365,8 @@ stdenv.mkDerivation ({
# 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"
]
;

View File

@ -123,8 +123,8 @@ let version = "4.9.4";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -135,8 +135,8 @@ let version = "4.9.4";
"--enable-sjlj-exceptions"
"--enable-threads=win32"
"--disable-win32-registry"
] else if crossStageStatic then
[ "--disable-libssp"
] else if crossStageStatic then [
"--disable-libssp"
"--disable-nls"
"--without-headers"
"--disable-threads"
@ -145,13 +145,12 @@ let version = "4.9.4";
"--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"
] 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"
@ -173,12 +172,11 @@ let version = "4.9.4";
# 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-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,7 +351,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"
] ++
# Java options
optionals langJava [
@ -361,7 +363,8 @@ stdenv.mkDerivation ({
# 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}"

View File

@ -127,8 +127,8 @@ let version = "5.5.0";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -139,8 +139,9 @@ let version = "5.5.0";
"--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-libgomp"
@ -148,10 +149,10 @@ let version = "5.5.0";
"--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"
] 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 [
@ -175,13 +176,11 @@ let version = "5.5.0";
# 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-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 "";
@ -374,7 +373,8 @@ stdenv.mkDerivation ({
# 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"
]
;

View File

@ -124,8 +124,8 @@ let version = "6.4.0";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -146,14 +146,12 @@ let version = "6.4.0";
"--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"
] 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"
@ -174,12 +172,12 @@ let version = "6.4.0";
"--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"
"--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 "";
@ -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"
]
;

View File

@ -122,8 +122,8 @@ let version = "7.2.0";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -134,8 +134,8 @@ let version = "7.2.0";
"--enable-sjlj-exceptions"
"--enable-threads=win32"
"--disable-win32-registry"
] else if crossStageStatic then
[ "--disable-libssp"
] else if crossStageStatic then [
"--disable-libssp"
"--disable-nls"
"--without-headers"
"--disable-threads"
@ -144,13 +144,12 @@ let version = "7.2.0";
"--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"
] 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"
@ -172,12 +171,11 @@ let version = "7.2.0";
# 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-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 "";
@ -369,7 +367,8 @@ stdenv.mkDerivation ({
# 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"
]
;

View File

@ -122,8 +122,8 @@ let version = "7-20170409";
# 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"
(if crossMingw && crossStageStatic then [
"--with-headers=${libcCross}/include"
"--with-gcc"
"--with-gnu-as"
"--with-gnu-ld"
@ -134,8 +134,8 @@ let version = "7-20170409";
"--enable-sjlj-exceptions"
"--enable-threads=win32"
"--disable-win32-registry"
] else if crossStageStatic then
[ "--disable-libssp"
] else if crossStageStatic then [
"--disable-libssp"
"--disable-nls"
"--without-headers"
"--disable-threads"
@ -144,13 +144,12 @@ let version = "7-20170409";
"--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"
] 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"
@ -172,12 +171,11 @@ let version = "7-20170409";
# 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-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 "";
@ -356,7 +354,8 @@ stdenv.mkDerivation ({
# 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"
]
;