git.iko.soy/typeable/nixpkgs
on master help sign in
gcc: Misc indentation and whitespace-in-string fixes
commitab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a authorJohn Ericson <John.Ericson@Obsidian.Systems> dateTue 14 Nov 2017, 18:32 (9 years ago) parent1c12072
7 files changed+404−400
pkgs/development/compilers/gcc/4.5/default.nix+15−13 pkgs/development/compilers/gcc/4.8/default.nix+66−63 pkgs/development/compilers/gcc/4.9/default.nix+70−67 pkgs/development/compilers/gcc/5/default.nix+64−64 pkgs/development/compilers/gcc/6/default.nix+61−63 pkgs/development/compilers/gcc/7/default.nix+64−65 pkgs/development/compilers/gcc/snapshot/default.nix+64−65
pkgs/development/compilers/gcc/4.5/default.nix+15−13
@@ -74,8 +74,8 @@ let version = "4.5.4";
7474 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
7575 optional (gccAbi != null) "--with-abi=${gccAbi}" ++
7676 # Ensure that -print-prog-name is able to find the correct programs.
77− [ " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
78− " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
77+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
78+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
7979 (if crossMingw && crossStageStatic then [
8080 "--with-headers=${libcCross}/include"
8181 "--with-gcc"
@@ -88,19 +88,21 @@ let version = "4.5.4";
8888 "--enable-sjlj-exceptions"
8989 "--enable-threads=win32"
9090 "--disable-win32-registry"
91− ] else if crossStageStatic then [
92− "--disable-libssp --disable-nls"
91+ ] else if crossStageStatic then [
92+ "--disable-libssp"
93+ "--disable-nls"
9394 "--without-headers"
9495 "--disable-threads"
9596 "--disable-libmudflap"
96− "--disable-libgomp "
97+ "--disable-libgomp"
9798 "--disable-shared"
9899 "--disable-decimal-float" # libdecnumber requires libc
99− ] else [
100+ ] else [
100101 "--with-headers=${libcCross}/include"
101102 "--enable-__cxa_atexit"
102103 "--enable-long-long"
103− ] ++ (if crossMingw then [
104+ ] ++
105+ (if crossMingw then [
104106 "--enable-threads=win32"
105107 "--enable-sjlj-exceptions"
106108 "--enable-hash-synchronization"
@@ -108,12 +110,11 @@ let version = "4.5.4";
108110 "--disable-libssp"
109111 "--disable-nls"
110112 "--with-dwarf2"
111− ] else [
113+ ] else [
112114 "--enable-threads=posix"
113115 "--enable-nls"
114− "--disable-decimal-float"
115− ]) # No final libdecnumber (it may work only in 386)
116− );
116+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
117+ ]));
117118 stageNameAddon = if crossStageStatic then "-stage-static" else
118119 "-stage-final";
119120 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
@@ -274,11 +275,12 @@ stdenv.mkDerivation ({
274275
275276 # Java options
276277 optionals langJava [
277− "--with-ecj-jar=${javaEcj} "
278+ "--with-ecj-jar=${javaEcj}"
278279
279280 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
280281 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
281− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
282+ "--enable-java-home"
283+ "--with-java-home=\${prefix}/lib/jvm/jre"
282284 ] ++
283285 optional javaAwtGtk "--enable-java-awt=gtk" ++
284286 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
pkgs/development/compilers/gcc/4.8/default.nix+66−63
@@ -123,68 +123,66 @@ let version = "4.8.5";
123123 optional (gccFloat != null) "--with-float=${gccFloat}" ++
124124 optional (gccMode != null) "--with-mode=${gccMode}";
125125
126− /* Cross-gcc settings (build == host != target) */
127126 /* Cross-gcc settings (build == host != target) */
128127 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
129128 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
130129 crossConfigureFlags =
131− mkPlatformFlags targetPlatform ++
132−
133− # Ensure that -print-prog-name is able to find the correct programs.
134− [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
135− "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
136− (if crossMingw && crossStageStatic then
137− [ "--with-headers=${libcCross}/include"
138− "--with-gcc"
139− "--with-gnu-as"
140− "--with-gnu-ld"
141− "--with-gnu-ld"
142− "--disable-shared"
143− "--disable-nls"
144− "--disable-debug"
145− "--enable-sjlj-exceptions"
146− "--enable-threads=win32"
147− "--disable-win32-registry"
148− ] else if crossStageStatic then
149− [ "--disable-libssp --disable-nls"
150− "--without-headers"
151− "--disable-threads "
152− "--disable-libgomp "
153− "--disable-libquadmath"
154− "--disable-shared"
155− "--disable-libatomic " # libatomic requires libc
156− "--disable-decimal-float" # libdecnumber requires libc
157− ] else
158− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
159− else ["--with-headers=${getDev libcCross}/include"]) ++
160− [ "--enable-__cxa_atexit"
161− "--enable-long-long"
162− ] ++
163− (if crossMingw then [
164− "--enable-threads=win32"
165− "--enable-sjlj-exceptions"
166− "--enable-hash-synchronization"
167− "--disable-libssp"
168− "--disable-nls"
169− "--with-dwarf2"
170− # I think noone uses shared gcc libs in mingw, so we better do the same.
171− # In any case, mingw32 g++ linking is broken by default with shared libs,
172− # unless adding "-lsupc++" to any linking command. I don't know why.
173− "--disable-shared"
174− # To keep ABI compatibility with upstream mingw-w64
175− "--enable-fully-dynamic-string"
176− ] else
177− optionals (targetPlatform.libc == "uclibc") [
178− # In uclibc cases, libgomp needs an additional '-ldl'
179− # and as I don't know how to pass it, I disable libgomp.
180− "--disable-libgomp"
181− ] ++
182− [ "--enable-threads=posix"
183− "--enable-nls"
184− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
185− ]
186− )
187− );
130+ mkPlatformFlags targetPlatform ++
131+
132+ # Ensure that -print-prog-name is able to find the correct programs.
133+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
134+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
135+ (if crossMingw && crossStageStatic then [
136+ "--with-headers=${libcCross}/include"
137+ "--with-gcc"
138+ "--with-gnu-as"
139+ "--with-gnu-ld"
140+ "--with-gnu-ld"
141+ "--disable-shared"
142+ "--disable-nls"
143+ "--disable-debug"
144+ "--enable-sjlj-exceptions"
145+ "--enable-threads=win32"
146+ "--disable-win32-registry"
147+ ] else if crossStageStatic then [
148+ "--disable-libssp"
149+ "--disable-nls"
150+ "--without-headers"
151+ "--disable-threads"
152+ "--disable-libgomp"
153+ "--disable-libquadmath"
154+ "--disable-shared"
155+ "--disable-libatomic" # libatomic requires libc
156+ "--disable-decimal-float" # libdecnumber requires libc
157+ ] else [
158+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
159+ else "--with-headers=${getDev libcCross}/include")
160+ "--enable-__cxa_atexit"
161+ "--enable-long-long"
162+ ] ++
163+ (if crossMingw then [
164+ "--enable-threads=win32"
165+ "--enable-sjlj-exceptions"
166+ "--enable-hash-synchronization"
167+ "--disable-libssp"
168+ "--disable-nls"
169+ "--with-dwarf2"
170+ # I think noone uses shared gcc libs in mingw, so we better do the same.
171+ # In any case, mingw32 g++ linking is broken by default with shared libs,
172+ # unless adding "-lsupc++" to any linking command. I don't know why.
173+ "--disable-shared"
174+ # To keep ABI compatibility with upstream mingw-w64
175+ "--enable-fully-dynamic-string"
176+ ] else
177+ optionals (targetPlatform.libc == "uclibc") [
178+ # In uclibc cases, libgomp needs an additional '-ldl'
179+ # and as I don't know how to pass it, I disable libgomp.
180+ "--disable-libgomp"
181+ ] ++ [
182+ "--enable-threads=posix"
183+ "--enable-nls"
184+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
185+ ]));
188186 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
189187 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
190188
@@ -347,7 +345,11 @@ stdenv.mkDerivation ({
347345
348346 # Optional features
349347 optional (isl != null) "--with-isl=${isl}" ++
350− optional (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl" ++
348+ optionals (cloog != null) [
349+ "--with-cloog=${cloog}"
350+ "--disable-cloog-version-check"
351+ "--enable-cloog-backend=isl"
352+ ] ++
351353
352354 (if enableMultilib
353355 then ["--enable-multilib" "--disable-libquadmath"]
@@ -359,11 +361,12 @@ stdenv.mkDerivation ({
359361
360362 # Java options
361363 optionals langJava [
362− "--with-ecj-jar=${javaEcj} "
364+ "--with-ecj-jar=${javaEcj}"
363365
364366 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
365367 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
366− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
368+ "--enable-java-home"
369+ "--with-java-home=\${prefix}/lib/jvm/jre"
367370 ] ++
368371 optional javaAwtGtk "--enable-java-awt=gtk" ++
369372 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
@@ -386,9 +389,9 @@ stdenv.mkDerivation ({
386389 # Platform-specific flags
387390 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
388391 optionals hostPlatform.isSunOS [
389− "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
392+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
390393 # On Illumos/Solaris GNU as is preferred
391− "--with-gnu-as --without-gnu-ld"
394+ "--with-gnu-as" "--without-gnu-ld"
392395 ]
393396 ;
394397
pkgs/development/compilers/gcc/4.9/default.nix+70−67
@@ -118,67 +118,65 @@ let version = "4.9.4";
118118 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
119119 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
120120 crossConfigureFlags =
121− mkPlatformFlags targetPlatform ++
122−
123− # Ensure that -print-prog-name is able to find the correct programs.
124− [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
125− "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
126− (if crossMingw && crossStageStatic then
127− [ "--with-headers=${libcCross}/include"
128− "--with-gcc"
129− "--with-gnu-as"
130− "--with-gnu-ld"
131− "--with-gnu-ld"
132− "--disable-shared"
133− "--disable-nls"
134− "--disable-debug"
135− "--enable-sjlj-exceptions"
136− "--enable-threads=win32"
137− "--disable-win32-registry"
138− ] else if crossStageStatic then
139− [ "--disable-libssp"
140− "--disable-nls"
141− "--without-headers"
142− "--disable-threads "
143− "--disable-libgomp "
144− "--disable-libquadmath"
145− "--disable-shared"
146− "--disable-libatomic " # libatomic requires libc
147− "--disable-decimal-float" # libdecnumber requires libc
148− ] else
149− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
150− else ["--with-headers=${getDev libcCross}/include"]) ++
151− [ "--enable-__cxa_atexit"
152− "--enable-long-long"
153− ] ++
154−
155− (if crossMingw then [
156− "--enable-threads=win32"
157− "--enable-sjlj-exceptions"
158− "--enable-hash-synchronization"
159− "--disable-libssp"
160− "--disable-nls"
161− "--with-dwarf2"
162− # I think noone uses shared gcc libs in mingw, so we better do the same.
163− # In any case, mingw32 g++ linking is broken by default with shared libs,
164− # unless adding "-lsupc++" to any linking command. I don't know why.
165− "--disable-shared"
166− # To keep ABI compatibility with upstream mingw-w64
167− "--enable-fully-dynamic-string"
168− ] else
169− optionals (targetPlatform.libc == "uclibc") [
170− # libsanitizer requires netrom/netrom.h which is not
171− # available in uclibc.
172− "--disable-libsanitizer"
173− # In uclibc cases, libgomp needs an additional '-ldl'
174− # and as I don't know how to pass it, I disable libgomp.
175− "--disable-libgomp"
176− ] ++
177− [ "--enable-threads=posix"
178− "--enable-nls"
179− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
180− ])
181− );
121+ mkPlatformFlags targetPlatform ++
122+
123+ # Ensure that -print-prog-name is able to find the correct programs.
124+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
125+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
126+ (if crossMingw && crossStageStatic then [
127+ "--with-headers=${libcCross}/include"
128+ "--with-gcc"
129+ "--with-gnu-as"
130+ "--with-gnu-ld"
131+ "--with-gnu-ld"
132+ "--disable-shared"
133+ "--disable-nls"
134+ "--disable-debug"
135+ "--enable-sjlj-exceptions"
136+ "--enable-threads=win32"
137+ "--disable-win32-registry"
138+ ] else if crossStageStatic then [
139+ "--disable-libssp"
140+ "--disable-nls"
141+ "--without-headers"
142+ "--disable-threads"
143+ "--disable-libgomp"
144+ "--disable-libquadmath"
145+ "--disable-shared"
146+ "--disable-libatomic" # libatomic requires libc
147+ "--disable-decimal-float" # libdecnumber requires libc
148+ ] else [
149+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
150+ else "--with-headers=${getDev libcCross}/include")
151+ "--enable-__cxa_atexit"
152+ "--enable-long-long"
153+ ] ++
154+ (if crossMingw then [
155+ "--enable-threads=win32"
156+ "--enable-sjlj-exceptions"
157+ "--enable-hash-synchronization"
158+ "--disable-libssp"
159+ "--disable-nls"
160+ "--with-dwarf2"
161+ # I think noone uses shared gcc libs in mingw, so we better do the same.
162+ # In any case, mingw32 g++ linking is broken by default with shared libs,
163+ # unless adding "-lsupc++" to any linking command. I don't know why.
164+ "--disable-shared"
165+ # To keep ABI compatibility with upstream mingw-w64
166+ "--enable-fully-dynamic-string"
167+ ] else
168+ optionals (targetPlatform.libc == "uclibc") [
169+ # libsanitizer requires netrom/netrom.h which is not
170+ # available in uclibc.
171+ "--disable-libsanitizer"
172+ # In uclibc cases, libgomp needs an additional '-ldl'
173+ # and as I don't know how to pass it, I disable libgomp.
174+ "--disable-libgomp"
175+ ] ++ [
176+ "--enable-threads=posix"
177+ "--enable-nls"
178+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
179+ ]));
182180 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
183181 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
184182
@@ -353,15 +351,20 @@ stdenv.mkDerivation ({
353351
354352 # Optional features
355353 optional (isl != null) "--with-isl=${isl}" ++
356− optional (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl" ++
354+ optionals (cloog != null) [
355+ "--with-cloog=${cloog}"
356+ "--disable-cloog-version-check"
357+ "--enable-cloog-backend=isl"
358+ ] ++
357359
358360 # Java options
359361 optionals langJava [
360− "--with-ecj-jar=${javaEcj} "
362+ "--with-ecj-jar=${javaEcj}"
361363
362364 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
363365 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
364− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
366+ "--enable-java-home"
367+ "--with-java-home=\${prefix}/lib/jvm/jre"
365368 ] ++
366369 optional javaAwtGtk "--enable-java-awt=gtk" ++
367370 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
@@ -384,9 +387,9 @@ stdenv.mkDerivation ({
384387 # Platform-specific flags
385388 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
386389 optionals hostPlatform.isSunOS [
387− "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
390+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
388391 # On Illumos/Solaris GNU as is preferred
389− "--with-gnu-as --without-gnu-ld"
392+ "--with-gnu-as" "--without-gnu-ld"
390393 ]
391394 ;
392395
@@ -427,7 +430,7 @@ stdenv.mkDerivation ({
427430 optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
428431 optional javaAwtGtk "--enable-java-awt=gtk" ++
429432 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
430− optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++
433+ optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++
431434 [
432435 "--with-gmp=${gmp.crossDrv}"
433436 "--with-mpfr=${mpfr.crossDrv}"
pkgs/development/compilers/gcc/5/default.nix+64−64
@@ -122,66 +122,65 @@ let version = "5.5.0";
122122 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
123123 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
124124 crossConfigureFlags =
125− mkPlatformFlags targetPlatform ++
126−
127− # Ensure that -print-prog-name is able to find the correct programs.
128− [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
129− "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
130− (if crossMingw && crossStageStatic then
131− [ "--with-headers=${libcCross}/include"
132− "--with-gcc"
133− "--with-gnu-as"
134− "--with-gnu-ld"
135− "--with-gnu-ld"
136− "--disable-shared"
137− "--disable-nls"
138− "--disable-debug"
139− "--enable-sjlj-exceptions"
140− "--enable-threads=win32"
141− "--disable-win32-registry"
142− ] else if crossStageStatic then
143− [ "--disable-libssp --disable-nls"
144− "--without-headers"
145− "--disable-threads "
146− "--disable-libgomp "
147− "--disable-libquadmath"
148− "--disable-shared"
149− "--disable-libatomic " # libatomic requires libc
150− "--disable-decimal-float" # libdecnumber requires libc
151− ] else
152− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
153− else ["--with-headers=${getDev libcCross}/include"]) ++
154− [ "--enable-__cxa_atexit"
155− "--enable-long-long"
156− ] ++
157− (if crossMingw then [
158− "--enable-threads=win32"
159− "--enable-sjlj-exceptions"
160− "--enable-hash-synchronization"
161− "--disable-libssp"
162− "--disable-nls"
163− "--with-dwarf2"
164− # I think noone uses shared gcc libs in mingw, so we better do the same.
165− # In any case, mingw32 g++ linking is broken by default with shared libs,
166− # unless adding "-lsupc++" to any linking command. I don't know why.
167− "--disable-shared"
168− # To keep ABI compatibility with upstream mingw-w64
169− "--enable-fully-dynamic-string"
170− ] else
171− optionals (targetPlatform.libc == "uclibc") [
172− # libsanitizer requires netrom/netrom.h which is not
173− # available in uclibc.
174− "--disable-libsanitizer"
175− # In uclibc cases, libgomp needs an additional '-ldl'
176− # and as I don't know how to pass it, I disable libgomp.
177− "--disable-libgomp"
178− ] ++
179− [ "--enable-threads=posix"
180− "--enable-nls"
181− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
182− ]
183− )
184− );
125+ mkPlatformFlags targetPlatform ++
126+
127+ # Ensure that -print-prog-name is able to find the correct programs.
128+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
129+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
130+ (if crossMingw && crossStageStatic then [
131+ "--with-headers=${libcCross}/include"
132+ "--with-gcc"
133+ "--with-gnu-as"
134+ "--with-gnu-ld"
135+ "--with-gnu-ld"
136+ "--disable-shared"
137+ "--disable-nls"
138+ "--disable-debug"
139+ "--enable-sjlj-exceptions"
140+ "--enable-threads=win32"
141+ "--disable-win32-registry"
142+ ] else if crossStageStatic then [
143+ "--disable-libssp"
144+ "--disable-nls"
145+ "--without-headers"
146+ "--disable-threads"
147+ "--disable-libgomp"
148+ "--disable-libquadmath"
149+ "--disable-shared"
150+ "--disable-libatomic" # libatomic requires libc
151+ "--disable-decimal-float" # libdecnumber requires libc
152+ ] else [
153+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
154+ else "--with-headers=${getDev libcCross}/include")
155+ "--enable-__cxa_atexit"
156+ "--enable-long-long"
157+ ] ++
158+ (if crossMingw then [
159+ "--enable-threads=win32"
160+ "--enable-sjlj-exceptions"
161+ "--enable-hash-synchronization"
162+ "--disable-libssp"
163+ "--disable-nls"
164+ "--with-dwarf2"
165+ # I think noone uses shared gcc libs in mingw, so we better do the same.
166+ # In any case, mingw32 g++ linking is broken by default with shared libs,
167+ # unless adding "-lsupc++" to any linking command. I don't know why.
168+ "--disable-shared"
169+ # To keep ABI compatibility with upstream mingw-w64
170+ "--enable-fully-dynamic-string"
171+ ] else
172+ optionals (targetPlatform.libc == "uclibc") [
173+ # libsanitizer requires netrom/netrom.h which is not
174+ # available in uclibc.
175+ "--disable-libsanitizer"
176+ # In uclibc cases, libgomp needs an additional '-ldl'
177+ # and as I don't know how to pass it, I disable libgomp.
178+ "--disable-libgomp"
179+ ] ++ [
180+ "--enable-threads=posix"
181+ "--enable-nls"
182+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
183+ ]));
185184 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
186185 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
187186
@@ -370,11 +369,12 @@ stdenv.mkDerivation ({
370369
371370 # Java options
372371 optionals langJava [
373− "--with-ecj-jar=${javaEcj} "
372+ "--with-ecj-jar=${javaEcj}"
374373
375374 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
376375 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
377− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
376+ "--enable-java-home"
377+ "--with-java-home=\${prefix}/lib/jvm/jre"
378378 ] ++
379379 optional javaAwtGtk "--enable-java-awt=gtk" ++
380380 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
@@ -397,9 +397,9 @@ stdenv.mkDerivation ({
397397 # Platform-specific flags
398398 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
399399 optionals hostPlatform.isSunOS [
400− "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
400+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
401401 # On Illumos/Solaris GNU as is preferred
402− "--with-gnu-as --without-gnu-ld"
402+ "--with-gnu-as" "--without-gnu-ld"
403403 ]
404404 ;
405405
pkgs/development/compilers/gcc/6/default.nix+61−63
@@ -119,67 +119,65 @@ let version = "6.4.0";
119119 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
120120 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
121121 crossConfigureFlags =
122− mkPlatformFlags targetPlatform ++
123−
124− # Ensure that -print-prog-name is able to find the correct programs.
125− [ " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
126− " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
127− (if crossMingw && crossStageStatic then
128− [ "--with-headers=${libcCross}/include"
129− "--with-gcc"
130− "--with-gnu-as"
131− "--with-gnu-ld"
132− "--with-gnu-ld"
133− "--disable-shared"
134− "--disable-nls"
135− "--disable-debug"
136− "--enable-sjlj-exceptions"
137− "--enable-threads=win32"
138− "--disable-win32-registry"
139− ] else if crossStageStatic then [
140− "--disable-libssp"
141− "--disable-nls"
142− "--without-headers"
143− "--disable-threads"
144− "--disable-libgomp"
145− "--disable-libquadmath"
146− "--disable-shared"
147− "--disable-libatomic" # libatomic requires libc
148− "--disable-decimal-float" # libdecnumber requires libc
122+ mkPlatformFlags targetPlatform ++
123+
124+ # Ensure that -print-prog-name is able to find the correct programs.
125+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
126+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
127+ (if crossMingw && crossStageStatic then [
128+ "--with-headers=${libcCross}/include"
129+ "--with-gcc"
130+ "--with-gnu-as"
131+ "--with-gnu-ld"
132+ "--with-gnu-ld"
133+ "--disable-shared"
134+ "--disable-nls"
135+ "--disable-debug"
136+ "--enable-sjlj-exceptions"
137+ "--enable-threads=win32"
138+ "--disable-win32-registry"
139+ ] else if crossStageStatic then [
140+ "--disable-libssp"
141+ "--disable-nls"
142+ "--without-headers"
143+ "--disable-threads"
144+ "--disable-libgomp"
145+ "--disable-libquadmath"
146+ "--disable-shared"
147+ "--disable-libatomic" # libatomic requires libc
148+ "--disable-decimal-float" # libdecnumber requires libc
149+ ] else [
150+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
151+ else "--with-headers=${getDev libcCross}/include")
152+ "--enable-__cxa_atexit"
153+ "--enable-long-long"
154+ ] ++
155+ (if crossMingw then [
156+ "--enable-threads=win32"
157+ "--enable-sjlj-exceptions"
158+ "--enable-hash-synchronization"
159+ "--disable-libssp"
160+ "--disable-nls"
161+ "--with-dwarf2"
162+ # I think noone uses shared gcc libs in mingw, so we better do the same.
163+ # In any case, mingw32 g++ linking is broken by default with shared libs,
164+ # unless adding "-lsupc++" to any linking command. I don't know why.
165+ "--disable-shared"
166+ # To keep ABI compatibility with upstream mingw-w64
167+ "--enable-fully-dynamic-string"
149168 ] else
150− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
151− else ["--with-headers=${getDev libcCross}/include"]) ++
152−
153− [ "--enable-__cxa_atexit"
154− "--enable-long-long"
155− ] ++
156−
157− (if crossMingw then [
158− "--enable-threads=win32"
159− "--enable-sjlj-exceptions"
160− "--enable-hash-synchronization"
161− "--disable-libssp"
162− "--disable-nls"
163− "--with-dwarf2"
164− # I think noone uses shared gcc libs in mingw, so we better do the same.
165− # In any case, mingw32 g++ linking is broken by default with shared libs,
166− # unless adding "-lsupc++" to any linking command. I don't know why.
167− "--disable-shared"
168− # To keep ABI compatibility with upstream mingw-w64
169− "--enable-fully-dynamic-string"
170− ] else
171− optionals (targetPlatform.libc == "uclibc") [
172− # libsanitizer requires netrom/netrom.h which is not
173− # available in uclibc.
174− "--disable-libsanitizer"
175− # In uclibc cases, libgomp needs an additional '-ldl'
176− # and as I don't know how to pass it, I disable libgomp.
177− "--disable-libgomp" ] ++
178− [ "--enable-threads=posix"
179− "--enable-nls"
180− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
181− ])
182− );
169+ optionals (targetPlatform.libc == "uclibc") [
170+ # libsanitizer requires netrom/netrom.h which is not
171+ # available in uclibc.
172+ "--disable-libsanitizer"
173+ # In uclibc cases, libgomp needs an additional '-ldl'
174+ # and as I don't know how to pass it, I disable libgomp.
175+ "--disable-libgomp"
176+ ] ++ [
177+ "--enable-threads=posix"
178+ "--enable-nls"
179+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
180+ ]));
183181 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
184182 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
185183
@@ -372,7 +370,7 @@ stdenv.mkDerivation ({
372370
373371 # Java options
374372 optionals langJava [
375− "--with-ecj-jar=${javaEcj} "
373+ "--with-ecj-jar=${javaEcj}"
376374
377375 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
378376 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
@@ -399,9 +397,9 @@ stdenv.mkDerivation ({
399397 # Platform-specific flags
400398 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
401399 optionals (hostPlatform.isSunOS) [
402− " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
400+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
403401 # On Illumos/Solaris GNU as is preferred
404− " --with-gnu-as --without-gnu-ld"
402+ "--with-gnu-as" "--without-gnu-ld"
405403 ]
406404 ;
407405
pkgs/development/compilers/gcc/7/default.nix+64−65
@@ -117,67 +117,65 @@ let version = "7.2.0";
117117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
118118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
119119 crossConfigureFlags =
120− mkPlatformFlags targetPlatform ++
121−
122− # Ensure that -print-prog-name is able to find the correct programs.
123− [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
124− "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
125− (if crossMingw && crossStageStatic then
126− [ "--with-headers=${libcCross}/include"
127− "--with-gcc"
128− "--with-gnu-as"
129− "--with-gnu-ld"
130− "--with-gnu-ld"
131− "--disable-shared"
132− "--disable-nls"
133− "--disable-debug"
134− "--enable-sjlj-exceptions"
135− "--enable-threads=win32"
136− "--disable-win32-registry"
137− ] else if crossStageStatic then
138− [ "--disable-libssp"
139− "--disable-nls"
140− "--without-headers"
141− "--disable-threads "
142− "--disable-libgomp "
143− "--disable-libquadmath"
144− "--disable-shared"
145− "--disable-libatomic " # libatomic requires libc
146− "--disable-decimal-float" # libdecnumber requires libc
147− ] else
148− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
149− else ["--with-headers=${getDev libcCross}/include"]) ++
150− [ "--enable-__cxa_atexit"
151− "--enable-long-long"
152− ] ++
153−
154− (if crossMingw then [
155− "--enable-threads=win32"
156− "--enable-sjlj-exceptions"
157− "--enable-hash-synchronization"
158− "--disable-libssp"
159− "--disable-nls"
160− "--with-dwarf2"
161− # I think noone uses shared gcc libs in mingw, so we better do the same.
162− # In any case, mingw32 g++ linking is broken by default with shared libs,
163− # unless adding "-lsupc++" to any linking command. I don't know why.
164− "--disable-shared"
165− # To keep ABI compatibility with upstream mingw-w64
166− "--enable-fully-dynamic-string"
167− ] else
168− optionals (targetPlatform.libc == "uclibc") [
169− # libsanitizer requires netrom/netrom.h which is not
170− # available in uclibc.
171− "--disable-libsanitizer"
172− # In uclibc cases, libgomp needs an additional '-ldl'
173− # and as I don't know how to pass it, I disable libgomp.
174− "--disable-libgomp"
175− ] ++
176− [ "--enable-threads=posix"
177− "--enable-nls"
178− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
179− ])
180− );
120+ mkPlatformFlags targetPlatform ++
121+
122+ # Ensure that -print-prog-name is able to find the correct programs.
123+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
124+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
125+ (if crossMingw && crossStageStatic then [
126+ "--with-headers=${libcCross}/include"
127+ "--with-gcc"
128+ "--with-gnu-as"
129+ "--with-gnu-ld"
130+ "--with-gnu-ld"
131+ "--disable-shared"
132+ "--disable-nls"
133+ "--disable-debug"
134+ "--enable-sjlj-exceptions"
135+ "--enable-threads=win32"
136+ "--disable-win32-registry"
137+ ] else if crossStageStatic then [
138+ "--disable-libssp"
139+ "--disable-nls"
140+ "--without-headers"
141+ "--disable-threads"
142+ "--disable-libgomp"
143+ "--disable-libquadmath"
144+ "--disable-shared"
145+ "--disable-libatomic" # libatomic requires libc
146+ "--disable-decimal-float" # libdecnumber requires libc
147+ ] else [
148+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
149+ else "--with-headers=${getDev libcCross}/include")
150+ "--enable-__cxa_atexit"
151+ "--enable-long-long"
152+ ] ++
153+ (if crossMingw then [
154+ "--enable-threads=win32"
155+ "--enable-sjlj-exceptions"
156+ "--enable-hash-synchronization"
157+ "--disable-libssp"
158+ "--disable-nls"
159+ "--with-dwarf2"
160+ # I think noone uses shared gcc libs in mingw, so we better do the same.
161+ # In any case, mingw32 g++ linking is broken by default with shared libs,
162+ # unless adding "-lsupc++" to any linking command. I don't know why.
163+ "--disable-shared"
164+ # To keep ABI compatibility with upstream mingw-w64
165+ "--enable-fully-dynamic-string"
166+ ] else
167+ optionals (targetPlatform.libc == "uclibc") [
168+ # libsanitizer requires netrom/netrom.h which is not
169+ # available in uclibc.
170+ "--disable-libsanitizer"
171+ # In uclibc cases, libgomp needs an additional '-ldl'
172+ # and as I don't know how to pass it, I disable libgomp.
173+ "--disable-libgomp"
174+ ] ++ [
175+ "--enable-threads=posix"
176+ "--enable-nls"
177+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
178+ ]));
181179 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
182180 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
183181
@@ -365,11 +363,12 @@ stdenv.mkDerivation ({
365363
366364 # Java options
367365 optionals langJava [
368− "--with-ecj-jar=${javaEcj} "
366+ "--with-ecj-jar=${javaEcj}"
369367
370368 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
371369 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
372− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
370+ "--enable-java-home"
371+ "--with-java-home=\${prefix}/lib/jvm/jre"
373372 ] ++
374373 optional javaAwtGtk "--enable-java-awt=gtk" ++
375374 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
@@ -392,9 +391,9 @@ stdenv.mkDerivation ({
392391 # Platform-specific flags
393392 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
394393 optionals hostPlatform.isSunOS [
395− "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
394+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
396395 # On Illumos/Solaris GNU as is preferred
397− "--with-gnu-as --without-gnu-ld"
396+ "--with-gnu-as" "--without-gnu-ld"
398397 ]
399398 ;
400399
pkgs/development/compilers/gcc/snapshot/default.nix+64−65
@@ -117,67 +117,65 @@ let version = "7-20170409";
117117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
118118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
119119 crossConfigureFlags =
120− mkPlatformFlags targetPlatform ++
121−
122− # Ensure that -print-prog-name is able to find the correct programs.
123− [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
124− "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
125− (if crossMingw && crossStageStatic then
126− [ "--with-headers=${libcCross}/include"
127− "--with-gcc"
128− "--with-gnu-as"
129− "--with-gnu-ld"
130− "--with-gnu-ld"
131− "--disable-shared"
132− "--disable-nls"
133− "--disable-debug"
134− "--enable-sjlj-exceptions"
135− "--enable-threads=win32"
136− "--disable-win32-registry"
137− ] else if crossStageStatic then
138− [ "--disable-libssp"
139− "--disable-nls"
140− "--without-headers"
141− "--disable-threads "
142− "--disable-libgomp "
143− "--disable-libquadmath"
144− "--disable-shared"
145− "--disable-libatomic " # libatomic requires libc
146− "--disable-decimal-float" # libdecnumber requires libc
147− ] else
148− (if crossDarwin then ["--with-sysroot=${getLib libcCross}/share/sysroot"]
149− else ["--with-headers=${getDev libcCross}/include"]) ++
150− [ "--enable-__cxa_atexit"
151− "--enable-long-long"
152− ] ++
153−
154− (if crossMingw then [
155− "--enable-threads=win32"
156− "--enable-sjlj-exceptions"
157− "--enable-hash-synchronization"
158− "--disable-libssp"
159− "--disable-nls"
160− "--with-dwarf2"
161− # I think noone uses shared gcc libs in mingw, so we better do the same.
162− # In any case, mingw32 g++ linking is broken by default with shared libs,
163− # unless adding "-lsupc++" to any linking command. I don't know why.
164− "--disable-shared"
165− # To keep ABI compatibility with upstream mingw-w64
166− "--enable-fully-dynamic-string"
167− ] else
168− optionals (targetPlatform.libc == "uclibc") [
169− # libsanitizer requires netrom/netrom.h which is not
170− # available in uclibc.
171− "--disable-libsanitizer"
172− # In uclibc cases, libgomp needs an additional '-ldl'
173− # and as I don't know how to pass it, I disable libgomp.
174− "--disable-libgomp"
175− ] ++
176− [ "--enable-threads=posix"
177− "--enable-nls"
178− "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
179− ])
180− );
120+ mkPlatformFlags targetPlatform ++
121+
122+ # Ensure that -print-prog-name is able to find the correct programs.
123+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
124+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
125+ (if crossMingw && crossStageStatic then [
126+ "--with-headers=${libcCross}/include"
127+ "--with-gcc"
128+ "--with-gnu-as"
129+ "--with-gnu-ld"
130+ "--with-gnu-ld"
131+ "--disable-shared"
132+ "--disable-nls"
133+ "--disable-debug"
134+ "--enable-sjlj-exceptions"
135+ "--enable-threads=win32"
136+ "--disable-win32-registry"
137+ ] else if crossStageStatic then [
138+ "--disable-libssp"
139+ "--disable-nls"
140+ "--without-headers"
141+ "--disable-threads"
142+ "--disable-libgomp"
143+ "--disable-libquadmath"
144+ "--disable-shared"
145+ "--disable-libatomic" # libatomic requires libc
146+ "--disable-decimal-float" # libdecnumber requires libc
147+ ] else [
148+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
149+ else "--with-headers=${getDev libcCross}/include")
150+ "--enable-__cxa_atexit"
151+ "--enable-long-long"
152+ ] ++
153+ (if crossMingw then [
154+ "--enable-threads=win32"
155+ "--enable-sjlj-exceptions"
156+ "--enable-hash-synchronization"
157+ "--disable-libssp"
158+ "--disable-nls"
159+ "--with-dwarf2"
160+ # I think noone uses shared gcc libs in mingw, so we better do the same.
161+ # In any case, mingw32 g++ linking is broken by default with shared libs,
162+ # unless adding "-lsupc++" to any linking command. I don't know why.
163+ "--disable-shared"
164+ # To keep ABI compatibility with upstream mingw-w64
165+ "--enable-fully-dynamic-string"
166+ ] else
167+ optionals (targetPlatform.libc == "uclibc") [
168+ # libsanitizer requires netrom/netrom.h which is not
169+ # available in uclibc.
170+ "--disable-libsanitizer"
171+ # In uclibc cases, libgomp needs an additional '-ldl'
172+ # and as I don't know how to pass it, I disable libgomp.
173+ "--disable-libgomp"
174+ ] ++ [
175+ "--enable-threads=posix"
176+ "--enable-nls"
177+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
178+ ]));
181179 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
182180 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
183181
@@ -352,11 +350,12 @@ stdenv.mkDerivation ({
352350
353351 # Java options
354352 optionals langJava [
355− "--with-ecj-jar=${javaEcj} "
353+ "--with-ecj-jar=${javaEcj}"
356354
357355 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
358356 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
359− "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
357+ "--enable-java-home"
358+ "--with-java-home=\${prefix}/lib/jvm/jre"
360359 ] ++
361360 optional javaAwtGtk "--enable-java-awt=gtk" ++
362361 optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
@@ -379,9 +378,9 @@ stdenv.mkDerivation ({
379378 # Platform-specific flags
380379 optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
381380 optionals hostPlatform.isSunOS [
382− "--enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit"
381+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
383382 # On Illumos/Solaris GNU as is preferred
384− "--with-gnu-as --without-gnu-ld"
383+ "--with-gnu-as" "--without-gnu-ld"
385384 ]
386385 ;
387386