···251252 <varlistentry>
253 <term><varname>enableParallelBuilding</varname></term>
254- <listitem><para>If set, <literal>stdenv</literal> will pass specific
255- flags to <literal>make</literal> and other build tools to enable
256- parallel building with up to <literal>build-cores</literal>
257- workers.</para></listitem>
0000000258 </varlistentry>
259260 <varlistentry>
···251252 <varlistentry>
253 <term><varname>enableParallelBuilding</varname></term>
254+ <listitem>
255+ <para>If set to <literal>true</literal>, <literal>stdenv</literal> will
256+ pass specific flags to <literal>make</literal> and other build tools to
257+ enable parallel building with up to <literal>build-cores</literal>
258+ workers.</para>
259+260+ <para>Unless set to <literal>false</literal>, some build systems with good
261+ support for parallel building including <literal>cmake</literal>,
262+ <literal>meson</literal>, and <literal>qmake</literal> will set it to
263+ <literal>true</literal>.</para>
264+ </listitem>
265 </varlistentry>
266267 <varlistentry>
+1-1
nixos/tests/printing.nix
···39 $client->waitForUnit("cups.service");
40 $client->sleep(10); # wait until cups is fully initialized
41 $client->succeed("lpstat -r") =~ /scheduler is running/ or die;
42- $client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
43 $client->succeed("curl --fail http://localhost:631/");
44 $client->succeed("curl --fail http://server:631/");
45 $server->fail("curl --fail --connect-timeout 2 http://client:631/");
···39 $client->waitForUnit("cups.service");
40 $client->sleep(10); # wait until cups is fully initialized
41 $client->succeed("lpstat -r") =~ /scheduler is running/ or die;
42+ $client->succeed("lpstat -H") =~ "localhost:631" or die;
43 $client->succeed("curl --fail http://localhost:631/");
44 $client->succeed("curl --fail http://server:631/");
45 $server->fail("curl --fail --connect-timeout 2 http://client:631/");
···31 then "install -D bitcoin-qt $out/bin/memorycoin-qt"
32 else "install -D bitcoind $out/bin/memorycoind";
3334+ # `make build/version.o`:
35+ # make: *** No rule to make target 'build/build.h', needed by 'build/version.o'. Stop.
36+ enableParallelBuilding = false;
37+38 meta = {
39 description = "Peer-to-peer, CPU-based electronic cash system";
40 longDescription= ''
+4
pkgs/applications/altcoins/primecoin.nix
···31 then "install -D bitcoin-qt $out/bin/primecoin-qt"
32 else "install -D bitcoind $out/bin/primecoind";
33000034 meta = {
35 description = "A new type cryptocurrency which is proof-of-work based on searching for prime numbers";
36 longDescription= ''
···31 then "install -D bitcoin-qt $out/bin/primecoin-qt"
32 else "install -D bitcoind $out/bin/primecoind";
3334+ # `make build/version.o`:
35+ # make: *** No rule to make target 'build/build.h', needed by 'build/version.o'. Stop.
36+ enableParallelBuilding = false;
37+38 meta = {
39 description = "A new type cryptocurrency which is proof-of-work based on searching for prime numbers";
40 longDescription= ''
+2-1
pkgs/applications/gis/qgis/default.nix
···1415 nativeBuildInputs = [ cmake makeWrapper ];
16017 # fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
18- #enableParallelBuilding = true;
1920 # To handle the lack of 'local' RPATH; required, as they call one of
21 # their built binaries requiring their libs, in the build process.
···1415 nativeBuildInputs = [ cmake makeWrapper ];
1617+ # `make -f src/providers/wms/CMakeFiles/wmsprovider_a.dir/build.make src/providers/wms/CMakeFiles/wmsprovider_a.dir/qgswmssourceselect.cpp.o`:
18 # fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
19+ enableParallelBuilding = false;
2021 # To handle the lack of 'local' RPATH; required, as they call one of
22 # their built binaries requiring their libs, in the build process.
···4 majorVersion = "1.9";
5in
6stdenv.mkDerivation rec {
7- name = "libmediaart-${majorVersion}.1";
89 src = fetchurl {
10 url = "mirror://gnome/sources/libmediaart/${majorVersion}/${name}.tar.xz";
11- sha256 = "0jg9gwxmhdxcbwb5svgkxkd3yl1d14wqzckcgg2swkn81i7al52v";
12 };
1314- nativeBuildInputs = [ pkgconfig ];
15- buildInputs = [ glib gdk_pixbuf gobjectIntrospection ];
1617 meta = with stdenv.lib; {
18 description = "Library tasked with managing, extracting and handling media art caches";
···4 majorVersion = "1.9";
5in
6stdenv.mkDerivation rec {
7+ name = "libmediaart-${majorVersion}.4";
89 src = fetchurl {
10 url = "mirror://gnome/sources/libmediaart/${majorVersion}/${name}.tar.xz";
11+ sha256 = "a57be017257e4815389afe4f58fdacb6a50e74fd185452b23a652ee56b04813d";
12 };
1314+ nativeBuildInputs = [ pkgconfig gobjectIntrospection ];
15+ buildInputs = [ glib gdk_pixbuf ];
1617 meta = with stdenv.lib; {
18 description = "Library tasked with managing, extracting and handling media art caches";
+38-33
pkgs/development/compilers/gcc/4.5/default.nix
···25, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
26, stripped ? true
27, buildPlatform, hostPlatform, targetPlatform
028}:
2930assert langJava -> zip != null && unzip != null
···258 "--with-mpc=${libmpc}"
259 ] ++
260 optional (libelf != null) "--with-libelf=${libelf}" ++
00261262 # Basic configuration
263 [
···349 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
350 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
351 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
352- # If we are making a cross compiler, cross != null
353- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
354 dontStrip = true;
355 };
3560357358 # Needed for the cross compilation to work
359 AR = "ar";
360 LD = "ld";
361 CC = "gcc";
362363- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
364- # the library headers and binaries, regarless of the language being
365- # compiled.
366-367- # Note: When building the Java AWT GTK+ peer, the build system doesn't
368- # honor `--with-gmp' et al., e.g., when building
369- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
370- # add them to $CPATH and $LIBRARY_PATH in this case.
371 #
372 # Likewise, the LTO code doesn't find zlib.
0000373374- CPATH = makeSearchPathOutput "dev" "include" ([]
375 ++ optional (zlib != null) zlib
376 ++ optional langJava boehmgc
377 ++ optionals javaAwtGtk xlibs
···382 # On GNU/Hurd glibc refers to Mach & Hurd
383 # headers.
384 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
385- libcCross.propagatedBuildInputs);
0386387- LIBRARY_PATH = makeLibraryPath ([]
388 ++ optional (zlib != null) zlib
389 ++ optional langJava boehmgc
390 ++ optionals javaAwtGtk xlibs
391 ++ optionals javaAwtGtk [ gmp mpfr ]
392- ++ optional (libpthread != null) libpthread);
0393394- EXTRA_TARGET_CFLAGS =
395- if targetPlatform != hostPlatform && libcCross != null then [
396- "-idirafter ${libcCross.dev}/include"
397- ]
398- ++ optionals (! crossStageStatic) [
399- "-B${libcCross.out}/lib"
400- ]
401- else null;
402403- EXTRA_TARGET_LDFLAGS =
404- if targetPlatform != hostPlatform && libcCross != null then [
405- "-Wl,-L${libcCross.out}/lib"
406- ]
407- ++ (if crossStageStatic then [
408 "-B${libcCross.out}/lib"
409 ] else [
410 "-Wl,-rpath,${libcCross.out}/lib"
411 "-Wl,-rpath-link,${libcCross.out}/lib"
412- ])
413- ++ optionals (libpthreadCross != null) [
414- "-L${libpthreadCross}/lib"
415- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
416- ]
417- else null;
418419 passthru = { inherit langC langCC langAda langFortran langVhdl
420 enableMultilib version; isGNU = true; };
···25, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
26, stripped ? true
27, buildPlatform, hostPlatform, targetPlatform
28+, buildPackages
29}:
3031assert langJava -> zip != null && unzip != null
···259 "--with-mpc=${libmpc}"
260 ] ++
261 optional (libelf != null) "--with-libelf=${libelf}" ++
262+ optional (!(crossMingw && crossStageStatic))
263+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
264265 # Basic configuration
266 [
···352 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
353 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
354 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
355+0356 dontStrip = true;
357 };
358359+ NIX_BUILD_CC = buildPackages.stdenv.cc;
360361 # Needed for the cross compilation to work
362 AR = "ar";
363 LD = "ld";
364 CC = "gcc";
365366+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
367+ # library headers and binaries, regarless of the language being compiled.
368+ #
369+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
370+ # `--with-gmp' et al., e.g., when building
371+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
372+ # them to $CPATH and $LIBRARY_PATH in this case.
0373 #
374 # Likewise, the LTO code doesn't find zlib.
375+ #
376+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
377+ # compiler (after the specs for the cross-gcc are created). Having
378+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
379380+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
381 ++ optional (zlib != null) zlib
382 ++ optional langJava boehmgc
383 ++ optionals javaAwtGtk xlibs
···388 # On GNU/Hurd glibc refers to Mach & Hurd
389 # headers.
390 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
391+ libcCross.propagatedBuildInputs
392+ ));
393394+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
395 ++ optional (zlib != null) zlib
396 ++ optional langJava boehmgc
397 ++ optionals javaAwtGtk xlibs
398 ++ optionals javaAwtGtk [ gmp mpfr ]
399+ ++ optional (libpthread != null) libpthread)
400+ );
401402+ EXTRA_TARGET_FLAGS = optionals
403+ (targetPlatform != hostPlatform && libcCross != null)
404+ ([
405+ "-idirafter ${libcCross.dev}/include"
406+ ] ++ optionals (! crossStageStatic) [
407+ "-B${libcCross.out}/lib"
408+ ]);
0409410+ EXTRA_TARGET_LDFLAGS = optionals
411+ (targetPlatform != hostPlatform && libcCross != null)
412+ ([
413+ "-Wl,-L${libcCross.out}/lib"
414+ ] ++ (if crossStageStatic then [
415 "-B${libcCross.out}/lib"
416 ] else [
417 "-Wl,-rpath,${libcCross.out}/lib"
418 "-Wl,-rpath-link,${libcCross.out}/lib"
419+ ]) ++ optionals (libpthreadCross != null) [
420+ "-L${libpthreadCross}/lib"
421+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
422+ ]);
00423424 passthru = { inherit langC langCC langAda langFortran langVhdl
425 enableMultilib version; isGNU = true; };
+38-41
pkgs/development/compilers/gcc/4.8/default.nix
···33, gnused ? null
34, darwin ? null
35, buildPlatform, hostPlatform, targetPlatform
036}:
3738assert langJava -> zip != null && unzip != null
···316 "--with-mpc=${libmpc}"
317 ] ++
318 optional (libelf != null) "--with-libelf=${libelf}" ++
00319320 # Basic configuration
321 [
···371372 # Ada
373 optional langAda "--enable-libada" ++
374-375- # Cross-compilation
376- optional (targetPlatform == hostPlatform) (
377- let incDir = if hostPlatform.isDarwin
378- then "${darwin.usr-include}"
379- else "${getDev stdenv.cc.libc}/include";
380- in "--with-native-system-header-dir=${incDir}"
381- ) ++
382383 platformFlags ++
384 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···444 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
445 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
446 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
447- # If we are making a cross compiler, targetPlatform != hostPlatform
448- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
449 dontStrip = true;
450 buildFlags = "";
451 };
4520453454 # Needed for the cross compilation to work
455 AR = "ar";
···457 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
458 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
459460- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
461- # the library headers and binaries, regarless of the language being
462- # compiled.
463-464- # Note: When building the Java AWT GTK+ peer, the build system doesn't
465- # honor `--with-gmp' et al., e.g., when building
466- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
467- # add them to $CPATH and $LIBRARY_PATH in this case.
468 #
469 # Likewise, the LTO code doesn't find zlib.
0000470471- CPATH = makeSearchPathOutput "dev" "include" ([]
472 ++ optional (zlib != null) zlib
473 ++ optional langJava boehmgc
474 ++ optionals javaAwtGtk xlibs
···479 # On GNU/Hurd glibc refers to Mach & Hurd
480 # headers.
481 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
482- libcCross.propagatedBuildInputs);
0483484- LIBRARY_PATH = makeLibraryPath ([]
485 ++ optional (zlib != null) zlib
486 ++ optional langJava boehmgc
487 ++ optionals javaAwtGtk xlibs
488 ++ optionals javaAwtGtk [ gmp mpfr ]
489- ++ optional (libpthread != null) libpthread);
0490491- EXTRA_TARGET_CFLAGS =
492- if targetPlatform != hostPlatform && libcCross != null then [
493- "-idirafter ${getDev libcCross}/include"
494- ]
495- ++ optionals (! crossStageStatic) [
496- "-B${libcCross.out}/lib"
497- ]
498- else null;
499500- EXTRA_TARGET_LDFLAGS =
501- if targetPlatform != hostPlatform && libcCross != null then [
502- "-Wl,-L${libcCross.out}/lib"
503- ]
504- ++ (if crossStageStatic then [
505 "-B${libcCross.out}/lib"
506 ] else [
507 "-Wl,-rpath,${libcCross.out}/lib"
508 "-Wl,-rpath-link,${libcCross.out}/lib"
509- ])
510- ++ optionals (libpthreadCross != null) [
511- "-L${libpthreadCross}/lib"
512- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
513- ]
514- else null;
515516 passthru =
517 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
···33, gnused ? null
34, darwin ? null
35, buildPlatform, hostPlatform, targetPlatform
36+, buildPackages
37}:
3839assert langJava -> zip != null && unzip != null
···317 "--with-mpc=${libmpc}"
318 ] ++
319 optional (libelf != null) "--with-libelf=${libelf}" ++
320+ optional (!(crossMingw && crossStageStatic))
321+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
322323 # Basic configuration
324 [
···374375 # Ada
376 optional langAda "--enable-libada" ++
00000000377378 platformFlags ++
379 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···439 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
440 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
441 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
442+0443 dontStrip = true;
444 buildFlags = "";
445 };
446447+ NIX_BUILD_CC = buildPackages.stdenv.cc;
448449 # Needed for the cross compilation to work
450 AR = "ar";
···452 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
453 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
454455+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
456+ # library headers and binaries, regarless of the language being compiled.
457+ #
458+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
459+ # `--with-gmp' et al., e.g., when building
460+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
461+ # them to $CPATH and $LIBRARY_PATH in this case.
0462 #
463 # Likewise, the LTO code doesn't find zlib.
464+ #
465+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
466+ # compiler (after the specs for the cross-gcc are created). Having
467+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
468469+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
470 ++ optional (zlib != null) zlib
471 ++ optional langJava boehmgc
472 ++ optionals javaAwtGtk xlibs
···477 # On GNU/Hurd glibc refers to Mach & Hurd
478 # headers.
479 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
480+ libcCross.propagatedBuildInputs
481+ ));
482483+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
484 ++ optional (zlib != null) zlib
485 ++ optional langJava boehmgc
486 ++ optionals javaAwtGtk xlibs
487 ++ optionals javaAwtGtk [ gmp mpfr ]
488+ ++ optional (libpthread != null) libpthread)
489+ );
490491+ EXTRA_TARGET_FLAGS = optionals
492+ (targetPlatform != hostPlatform && libcCross != null)
493+ ([
494+ "-idirafter ${libcCross.dev}/include"
495+ ] ++ optionals (! crossStageStatic) [
496+ "-B${libcCross.out}/lib"
497+ ]);
0498499+ EXTRA_TARGET_LDFLAGS = optionals
500+ (targetPlatform != hostPlatform && libcCross != null)
501+ ([
502+ "-Wl,-L${libcCross.out}/lib"
503+ ] ++ (if crossStageStatic then [
504 "-B${libcCross.out}/lib"
505 ] else [
506 "-Wl,-rpath,${libcCross.out}/lib"
507 "-Wl,-rpath-link,${libcCross.out}/lib"
508+ ]) ++ optionals (libpthreadCross != null) [
509+ "-L${libpthreadCross}/lib"
510+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
511+ ]);
00512513 passthru =
514 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
+38-41
pkgs/development/compilers/gcc/4.9/default.nix
···33, gnused ? null
34, darwin ? null
35, buildPlatform, hostPlatform, targetPlatform
036}:
3738assert langJava -> zip != null && unzip != null
···314 "--with-mpc=${libmpc}"
315 ] ++
316 optional (libelf != null) "--with-libelf=${libelf}" ++
00317318 # Basic configuration
319 [
···369370 # Ada
371 optional langAda "--enable-libada" ++
372-373- # Cross-compilation
374- optional (targetPlatform == hostPlatform) (
375- let incDir = if hostPlatform.isDarwin
376- then "${darwin.usr-include}"
377- else "${getDev stdenv.cc.libc}/include";
378- in "--with-native-system-header-dir=${incDir}"
379- ) ++
380381 platformFlags ++
382 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···442 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
443 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
444 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
445- # If we are making a cross compiler, targetPlatform != hostPlatform
446- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
447 dontStrip = true;
448 buildFlags = "";
449 };
4500451452 # Needed for the cross compilation to work
453 AR = "ar";
···455 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
456 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
457458- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
459- # the library headers and binaries, regarless of the language being
460- # compiled.
461-462- # Note: When building the Java AWT GTK+ peer, the build system doesn't
463- # honor `--with-gmp' et al., e.g., when building
464- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
465- # add them to $CPATH and $LIBRARY_PATH in this case.
466 #
467 # Likewise, the LTO code doesn't find zlib.
0000468469- CPATH = makeSearchPathOutput "dev" "include" ([]
470 ++ optional (zlib != null) zlib
471 ++ optional langJava boehmgc
472 ++ optionals javaAwtGtk xlibs
···477 # On GNU/Hurd glibc refers to Mach & Hurd
478 # headers.
479 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
480- libcCross.propagatedBuildInputs);
0481482- LIBRARY_PATH = makeLibraryPath ([]
483 ++ optional (zlib != null) zlib
484 ++ optional langJava boehmgc
485 ++ optionals javaAwtGtk xlibs
486 ++ optionals javaAwtGtk [ gmp mpfr ]
487- ++ optional (libpthread != null) libpthread);
0488489- EXTRA_TARGET_CFLAGS =
490- if targetPlatform != hostPlatform && libcCross != null then [
491- "-idirafter ${getDev libcCross}/include"
492- ]
493- ++ optionals (! crossStageStatic) [
494- "-B${libcCross.out}/lib"
495- ]
496- else null;
497498- EXTRA_TARGET_LDFLAGS =
499- if targetPlatform != hostPlatform && libcCross != null then [
500- "-Wl,-L${libcCross.out}/lib"
501- ]
502- ++ (if crossStageStatic then [
503 "-B${libcCross.out}/lib"
504 ] else [
505 "-Wl,-rpath,${libcCross.out}/lib"
506 "-Wl,-rpath-link,${libcCross.out}/lib"
507- ])
508- ++ optionals (libpthreadCross != null) [
509- "-L${libpthreadCross}/lib"
510- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
511- ]
512- else null;
513514 passthru =
515 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
···33, gnused ? null
34, darwin ? null
35, buildPlatform, hostPlatform, targetPlatform
36+, buildPackages
37}:
3839assert langJava -> zip != null && unzip != null
···315 "--with-mpc=${libmpc}"
316 ] ++
317 optional (libelf != null) "--with-libelf=${libelf}" ++
318+ optional (!(crossMingw && crossStageStatic))
319+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
320321 # Basic configuration
322 [
···372373 # Ada
374 optional langAda "--enable-libada" ++
00000000375376 platformFlags ++
377 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···437 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
438 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
439 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
440+0441 dontStrip = true;
442 buildFlags = "";
443 };
444445+ NIX_BUILD_CC = buildPackages.stdenv.cc;
446447 # Needed for the cross compilation to work
448 AR = "ar";
···450 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
451 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
452453+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
454+ # library headers and binaries, regarless of the language being compiled.
455+ #
456+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
457+ # `--with-gmp' et al., e.g., when building
458+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
459+ # them to $CPATH and $LIBRARY_PATH in this case.
0460 #
461 # Likewise, the LTO code doesn't find zlib.
462+ #
463+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
464+ # compiler (after the specs for the cross-gcc are created). Having
465+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
466467+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
468 ++ optional (zlib != null) zlib
469 ++ optional langJava boehmgc
470 ++ optionals javaAwtGtk xlibs
···475 # On GNU/Hurd glibc refers to Mach & Hurd
476 # headers.
477 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
478+ libcCross.propagatedBuildInputs
479+ ));
480481+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
482 ++ optional (zlib != null) zlib
483 ++ optional langJava boehmgc
484 ++ optionals javaAwtGtk xlibs
485 ++ optionals javaAwtGtk [ gmp mpfr ]
486+ ++ optional (libpthread != null) libpthread)
487+ );
488489+ EXTRA_TARGET_FLAGS = optionals
490+ (targetPlatform != hostPlatform && libcCross != null)
491+ ([
492+ "-idirafter ${getDev libcCross}/include"
493+ ] ++ optionals (! crossStageStatic) [
494+ "-B${libcCross.out}/lib"
495+ ]);
0496497+ EXTRA_TARGET_LDFLAGS = optionals
498+ (targetPlatform != hostPlatform && libcCross != null)
499+ ([
500+ "-Wl,-L${libcCross.out}/lib"
501+ ] ++ (if crossStageStatic then [
502 "-B${libcCross.out}/lib"
503 ] else [
504 "-Wl,-rpath,${libcCross.out}/lib"
505 "-Wl,-rpath-link,${libcCross.out}/lib"
506+ ]) ++ optionals (libpthreadCross != null) [
507+ "-L${libpthreadCross}/lib"
508+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
509+ ]);
00510511 passthru =
512 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
+37-41
pkgs/development/compilers/gcc/5/default.nix
···329 "--with-mpc=${libmpc}"
330 ] ++
331 optional (libelf != null) "--with-libelf=${libelf}" ++
00332333 # Basic configuration
334 [
···379380 # Ada
381 optional langAda "--enable-libada" ++
382-383- # Cross-compilation
384- optional (targetPlatform == hostPlatform) (
385- let incDir = if hostPlatform.isDarwin
386- then "${darwin.usr-include}"
387- else "${getDev stdenv.cc.libc}/include";
388- in "--with-native-system-header-dir=${incDir}"
389- ) ++
390391 platformFlags ++
392 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···452 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
453 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
454 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
455- # If we are making a cross compiler, targetPlatform != hostPlatform
456- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
457 dontStrip = true;
458 buildFlags = "";
459 };
4600461462 # Needed for the cross compilation to work
463 AR = "ar";
···465 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
466 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
467468- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
469- # the library headers and binaries, regarless of the language being
470- # compiled.
471-472- # Note: When building the Java AWT GTK+ peer, the build system doesn't
473- # honor `--with-gmp' et al., e.g., when building
474- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
475- # add them to $CPATH and $LIBRARY_PATH in this case.
476 #
477 # Likewise, the LTO code doesn't find zlib.
0000478479- CPATH = makeSearchPathOutput "dev" "include" ([]
480 ++ optional (zlib != null) zlib
481 ++ optional langJava boehmgc
482 ++ optionals javaAwtGtk xlibs
···487 # On GNU/Hurd glibc refers to Mach & Hurd
488 # headers.
489 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
490- libcCross.propagatedBuildInputs);
0491492- LIBRARY_PATH = makeLibraryPath ([]
493 ++ optional (zlib != null) zlib
494 ++ optional langJava boehmgc
495 ++ optionals javaAwtGtk xlibs
496 ++ optionals javaAwtGtk [ gmp mpfr ]
497- ++ optional (libpthread != null) libpthread);
0498499- EXTRA_TARGET_CFLAGS =
500- if targetPlatform != hostPlatform && libcCross != null then [
501- "-idirafter ${getDev libcCross}/include"
502- ]
503- ++ optionals (! crossStageStatic) [
504- "-B${libcCross.out}/lib"
505- ]
506- else null;
507508- EXTRA_TARGET_LDFLAGS =
509- if targetPlatform != hostPlatform && libcCross != null then [
510- "-Wl,-L${libcCross.out}/lib"
511- ]
512- ++ (if crossStageStatic then [
513 "-B${libcCross.out}/lib"
514 ] else [
515 "-Wl,-rpath,${libcCross.out}/lib"
516 "-Wl,-rpath-link,${libcCross.out}/lib"
517- ])
518- ++ optionals (libpthreadCross != null) [
519- "-L${libpthreadCross}/lib"
520- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
521- ]
522- else null;
523524 passthru =
525 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
···329 "--with-mpc=${libmpc}"
330 ] ++
331 optional (libelf != null) "--with-libelf=${libelf}" ++
332+ optional (!(crossMingw && crossStageStatic))
333+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
334335 # Basic configuration
336 [
···381382 # Ada
383 optional langAda "--enable-libada" ++
00000000384385 platformFlags ++
386 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···446 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
447 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
448 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
449+0450 dontStrip = true;
451 buildFlags = "";
452 };
453454+ NIX_BUILD_CC = buildPackages.stdenv.cc;
455456 # Needed for the cross compilation to work
457 AR = "ar";
···459 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
460 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
461462+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
463+ # library headers and binaries, regarless of the language being compiled.
464+ #
465+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
466+ # `--with-gmp' et al., e.g., when building
467+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
468+ # them to $CPATH and $LIBRARY_PATH in this case.
0469 #
470 # Likewise, the LTO code doesn't find zlib.
471+ #
472+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
473+ # compiler (after the specs for the cross-gcc are created). Having
474+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
475476+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
477 ++ optional (zlib != null) zlib
478 ++ optional langJava boehmgc
479 ++ optionals javaAwtGtk xlibs
···484 # On GNU/Hurd glibc refers to Mach & Hurd
485 # headers.
486 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
487+ libcCross.propagatedBuildInputs
488+ ));
489490+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
491 ++ optional (zlib != null) zlib
492 ++ optional langJava boehmgc
493 ++ optionals javaAwtGtk xlibs
494 ++ optionals javaAwtGtk [ gmp mpfr ]
495+ ++ optional (libpthread != null) libpthread)
496+ );
497498+ EXTRA_TARGET_FLAGS = optionals
499+ (targetPlatform != hostPlatform && libcCross != null)
500+ ([
501+ "-idirafter ${getDev libcCross}/include"
502+ ] ++ optionals (! crossStageStatic) [
503+ "-B${libcCross.out}/lib"
504+ ]);
0505506+ EXTRA_TARGET_LDFLAGS = optionals
507+ (targetPlatform != hostPlatform && libcCross != null)
508+ ([
509+ "-Wl,-L${libcCross.out}/lib"
510+ ] ++ (if crossStageStatic then [
511 "-B${libcCross.out}/lib"
512 ] else [
513 "-Wl,-rpath,${libcCross.out}/lib"
514 "-Wl,-rpath-link,${libcCross.out}/lib"
515+ ]) ++ optionals (libpthreadCross != null) [
516+ "-L${libpthreadCross}/lib"
517+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
518+ ]);
00519520 passthru =
521 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
+38-41
pkgs/development/compilers/gcc/6/default.nix
···34, cloog # unused; just for compat with gcc4, as we override the parameter on some places
35, darwin ? null
36, buildPlatform, hostPlatform, targetPlatform
037}:
3839assert langJava -> zip != null && unzip != null
···330 "--with-mpc=${libmpc}"
331 ] ++
332 optional (libelf != null) "--with-libelf=${libelf}" ++
00333334 # Basic configuration
335 [
···380381 # Ada
382 optional langAda "--enable-libada" ++
383-384- # Cross-compilation
385- optional (targetPlatform == hostPlatform) (
386- let incDir = if hostPlatform.isDarwin
387- then "${darwin.usr-include}"
388- else "${getDev stdenv.cc.libc}/include";
389- in "--with-native-system-header-dir=${incDir}"
390- ) ++
391392 platformFlags ++
393 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···452 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
453 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
454 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
455- # If we are making a cross compiler, targetPlatform != hostPlatform
456- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
457 dontStrip = true;
458 buildFlags = "";
459 };
4600461462 # Needed for the cross compilation to work
463 AR = "ar";
···465 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
466 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
467468- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
469- # the library headers and binaries, regarless of the language being
470- # compiled.
471-472- # Note: When building the Java AWT GTK+ peer, the build system doesn't
473- # honor `--with-gmp' et al., e.g., when building
474- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
475- # add them to $CPATH and $LIBRARY_PATH in this case.
476 #
477 # Likewise, the LTO code doesn't find zlib.
0000478479- CPATH = makeSearchPathOutput "dev" "include" ([]
480 ++ optional (zlib != null) zlib
481 ++ optional langJava boehmgc
482 ++ optionals javaAwtGtk xlibs
···487 # On GNU/Hurd glibc refers to Mach & Hurd
488 # headers.
489 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
490- libcCross.propagatedBuildInputs);
0491492- LIBRARY_PATH = makeLibraryPath ([]
493 ++ optional (zlib != null) zlib
494 ++ optional langJava boehmgc
495 ++ optionals javaAwtGtk xlibs
496 ++ optionals javaAwtGtk [ gmp mpfr ]
497- ++ optional (libpthread != null) libpthread);
0498499- EXTRA_TARGET_CFLAGS =
500- if targetPlatform != hostPlatform && libcCross != null then [
501- "-idirafter ${getDev libcCross}/include"
502- ]
503- ++ optionals (! crossStageStatic) [
504- "-B${libcCross.out}/lib"
505- ]
506- else null;
507508- EXTRA_TARGET_LDFLAGS =
509- if targetPlatform != hostPlatform && libcCross != null then [
510- "-Wl,-L${libcCross.out}/lib"
511- ]
512- ++ (if crossStageStatic then [
513 "-B${libcCross.out}/lib"
514 ] else [
515 "-Wl,-rpath,${libcCross.out}/lib"
516 "-Wl,-rpath-link,${libcCross.out}/lib"
517- ])
518- ++ optionals (libpthreadCross != null) [
519- "-L${libpthreadCross}/lib"
520- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
521- ]
522- else null;
523524 passthru =
525 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
···34, cloog # unused; just for compat with gcc4, as we override the parameter on some places
35, darwin ? null
36, buildPlatform, hostPlatform, targetPlatform
37+, buildPackages
38}:
3940assert langJava -> zip != null && unzip != null
···331 "--with-mpc=${libmpc}"
332 ] ++
333 optional (libelf != null) "--with-libelf=${libelf}" ++
334+ optional (!(crossMingw && crossStageStatic))
335+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
336337 # Basic configuration
338 [
···383384 # Ada
385 optional langAda "--enable-libada" ++
00000000386387 platformFlags ++
388 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···447 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
448 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
449 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
450+0451 dontStrip = true;
452 buildFlags = "";
453 };
454455+ NIX_BUILD_CC = buildPackages.stdenv.cc;
456457 # Needed for the cross compilation to work
458 AR = "ar";
···460 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
461 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
462463+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
464+ # library headers and binaries, regarless of the language being compiled.
465+ #
466+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
467+ # `--with-gmp' et al., e.g., when building
468+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
469+ # them to $CPATH and $LIBRARY_PATH in this case.
0470 #
471 # Likewise, the LTO code doesn't find zlib.
472+ #
473+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
474+ # compiler (after the specs for the cross-gcc are created). Having
475+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
476477+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
478 ++ optional (zlib != null) zlib
479 ++ optional langJava boehmgc
480 ++ optionals javaAwtGtk xlibs
···485 # On GNU/Hurd glibc refers to Mach & Hurd
486 # headers.
487 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
488+ libcCross.propagatedBuildInputs
489+ ));
490491+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
492 ++ optional (zlib != null) zlib
493 ++ optional langJava boehmgc
494 ++ optionals javaAwtGtk xlibs
495 ++ optionals javaAwtGtk [ gmp mpfr ]
496+ ++ optional (libpthread != null) libpthread)
497+ );
498499+ EXTRA_TARGET_FLAGS = optionals
500+ (targetPlatform != hostPlatform && libcCross != null)
501+ ([
502+ "-idirafter ${getDev libcCross}/include"
503+ ] ++ optionals (! crossStageStatic) [
504+ "-B${libcCross.out}/lib"
505+ ]);
0506507+ EXTRA_TARGET_LDFLAGS = optionals
508+ (targetPlatform != hostPlatform && libcCross != null)
509+ ([
510+ "-Wl,-L${libcCross.out}/lib"
511+ ] ++ (if crossStageStatic then [
512 "-B${libcCross.out}/lib"
513 ] else [
514 "-Wl,-rpath,${libcCross.out}/lib"
515 "-Wl,-rpath-link,${libcCross.out}/lib"
516+ ]) ++ optionals (libpthreadCross != null) [
517+ "-L${libpthreadCross}/lib"
518+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
519+ ]);
00520521 passthru =
522 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
+38-41
pkgs/development/compilers/gcc/7/default.nix
···35, darwin ? null
36, flex ? null
37, buildPlatform, hostPlatform, targetPlatform
038}:
3940assert langJava -> zip != null && unzip != null
···323 "--with-mpc=${libmpc}"
324 ] ++
325 optional (libelf != null) "--with-libelf=${libelf}" ++
00326327 # Basic configuration
328 [
···373374 # Ada
375 optional langAda "--enable-libada" ++
376-377- # Cross-compilation
378- optional (targetPlatform == hostPlatform) (
379- let incDir = if hostPlatform.isDarwin
380- then "${darwin.usr-include}"
381- else "${getDev stdenv.cc.libc}/include";
382- in "--with-native-system-header-dir=${incDir}"
383- ) ++
384385 platformFlags ++
386 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···446 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
447 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
448 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
449- # If we are making a cross compiler, targetPlatform != hostPlatform
450- NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
451 dontStrip = true;
452 buildFlags = "";
453 };
4540455456 # Needed for the cross compilation to work
457 AR = "ar";
···459 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
460 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
461462- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
463- # the library headers and binaries, regarless of the language being
464- # compiled.
465-466- # Note: When building the Java AWT GTK+ peer, the build system doesn't
467- # honor `--with-gmp' et al., e.g., when building
468- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
469- # add them to $CPATH and $LIBRARY_PATH in this case.
470 #
471 # Likewise, the LTO code doesn't find zlib.
0000472473- CPATH = makeSearchPathOutput "dev" "include" ([]
474 ++ optional (zlib != null) zlib
475 ++ optional langJava boehmgc
476 ++ optionals javaAwtGtk xlibs
···481 # On GNU/Hurd glibc refers to Mach & Hurd
482 # headers.
483 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
484- libcCross.propagatedBuildInputs);
0485486- LIBRARY_PATH = makeLibraryPath ([]
487 ++ optional (zlib != null) zlib
488 ++ optional langJava boehmgc
489 ++ optionals javaAwtGtk xlibs
490 ++ optionals javaAwtGtk [ gmp mpfr ]
491- ++ optional (libpthread != null) libpthread);
0492493- EXTRA_TARGET_CFLAGS =
494- if targetPlatform != hostPlatform && libcCross != null then [
495- "-idirafter ${getDev libcCross}/include"
496- ]
497- ++ optionals (! crossStageStatic) [
498- "-B${libcCross.out}/lib"
499- ]
500- else null;
501502- EXTRA_TARGET_LDFLAGS =
503- if targetPlatform != hostPlatform && libcCross != null then [
504- "-Wl,-L${libcCross.out}/lib"
505- ]
506- ++ (if crossStageStatic then [
507 "-B${libcCross.out}/lib"
508 ] else [
509 "-Wl,-rpath,${libcCross.out}/lib"
510 "-Wl,-rpath-link,${libcCross.out}/lib"
511- ])
512- ++ optionals (libpthreadCross != null) [
513- "-L${libpthreadCross}/lib"
514- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
515- ]
516- else null;
517518 passthru =
519 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
···35, darwin ? null
36, flex ? null
37, buildPlatform, hostPlatform, targetPlatform
38+, buildPackages
39}:
4041assert langJava -> zip != null && unzip != null
···324 "--with-mpc=${libmpc}"
325 ] ++
326 optional (libelf != null) "--with-libelf=${libelf}" ++
327+ optional (!(crossMingw && crossStageStatic))
328+ "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++
329330 # Basic configuration
331 [
···376377 # Ada
378 optional langAda "--enable-libada" ++
00000000379380 platformFlags ++
381 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
···441 STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
442 CC_FOR_TARGET = "${targetPlatform.config}-gcc";
443 CXX_FOR_TARGET = "${targetPlatform.config}-g++";
444+0445 dontStrip = true;
446 buildFlags = "";
447 };
448449+ NIX_BUILD_CC = buildPackages.stdenv.cc;
450451 # Needed for the cross compilation to work
452 AR = "ar";
···454 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
455 CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc";
456457+ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
458+ # library headers and binaries, regarless of the language being compiled.
459+ #
460+ # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
461+ # `--with-gmp' et al., e.g., when building
462+ # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
463+ # them to $CPATH and $LIBRARY_PATH in this case.
0464 #
465 # Likewise, the LTO code doesn't find zlib.
466+ #
467+ # Cross-compiling, we need gcc not to read ./specs in order to build the g++
468+ # compiler (after the specs for the cross-gcc are created). Having
469+ # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
470471+ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
472 ++ optional (zlib != null) zlib
473 ++ optional langJava boehmgc
474 ++ optionals javaAwtGtk xlibs
···479 # On GNU/Hurd glibc refers to Mach & Hurd
480 # headers.
481 ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
482+ libcCross.propagatedBuildInputs
483+ ));
484485+ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
486 ++ optional (zlib != null) zlib
487 ++ optional langJava boehmgc
488 ++ optionals javaAwtGtk xlibs
489 ++ optionals javaAwtGtk [ gmp mpfr ]
490+ ++ optional (libpthread != null) libpthread)
491+ );
492493+ EXTRA_TARGET_FLAGS = optionals
494+ (targetPlatform != hostPlatform && libcCross != null)
495+ ([
496+ "-idirafter ${getDev libcCross}/include"
497+ ] ++ optionals (! crossStageStatic) [
498+ "-B${libcCross.out}/lib"
499+ ]);
0500501+ EXTRA_TARGET_LDFLAGS = optionals
502+ (targetPlatform != hostPlatform && libcCross != null)
503+ ([
504+ "-Wl,-L${libcCross.out}/lib"
505+ ] ++ (if crossStageStatic then [
506 "-B${libcCross.out}/lib"
507 ] else [
508 "-Wl,-rpath,${libcCross.out}/lib"
509 "-Wl,-rpath-link,${libcCross.out}/lib"
510+ ]) ++ optionals (libpthreadCross != null) [
511+ "-L${libpthreadCross}/lib"
512+ "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
513+ ]);
00514515 passthru =
516 { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
+94-106
pkgs/development/compilers/gcc/builder.sh
···1source $stdenv/setup
234-export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
5-mkdir $NIX_FIXINC_DUMMY
0000678if test "$staticCompiler" = "1"; then
···131415# GCC interprets empty paths as ".", which we don't want.
16-if test -z "$CPATH"; then unset CPATH; fi
17-if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi
18-echo "\$CPATH is \`$CPATH'"
19-echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
2021if test "$noSysDirs" = "1"; then
2223- if test -e $NIX_CC/nix-support/orig-libc; then
24-25- # Figure out what extra flags to pass to the gcc compilers
26- # being generated to make sure that they use our glibc.
27- extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
28- extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before || true)"
29-30- # Use *real* header files, otherwise a limits.h is generated
31- # that does not include Glibc's limits.h (notably missing
32- # SSIZE_MAX, which breaks the build).
33- export NIX_FIXINC_DUMMY=$libc_dev/include
3435- # The path to the Glibc binaries such as `crti.o'.
36- glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
03738- else
39- # Hack: support impure environments.
40- extraFlags="-isystem /usr/include"
41- extraLDFlags="-L/usr/lib64 -L/usr/lib"
42- glibc_libdir="/usr/lib"
43- export NIX_FIXINC_DUMMY=/usr/include
44- fi
45-46- extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
47- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
48-49- # BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
50- # make sure to explictly add them so that files compiled with the
51- # bootstrap compiler are optimized and (optionally) contain
52- # debugging information (info "(gccinstall) Building").
53- if test -n "$dontStrip"; then
54- extraFlags="-O2 -g $extraFlags"
55- else
56- # Don't pass `-g' at all; this saves space while building.
57- extraFlags="-O2 $extraFlags"
58- fi
5960- EXTRA_FLAGS="$extraFlags"
61- for i in $extraLDFlags; do
62- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
63- done
6465- if test -n "$targetConfig"; then
66- # Cross-compiling, we need gcc not to read ./specs in order to build
67- # the g++ compiler (after the specs for the cross-gcc are created).
68- # Having LIBRARY_PATH= makes gcc read the specs from ., and the build
69- # breaks. Having this variable comes from the default.nix code to bring
70- # gcj in.
71- unset LIBRARY_PATH
72- unset CPATH
73- else
74- if test -z "$NIX_CC_CROSS"; then
75- EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
76- EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
77- EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
78 else
79- # This the case of cross-building the gcc.
80- # We need special flags for the target, different than those of the build
81- # Assertion:
82- test -e $NIX_CC_CROSS/nix-support/orig-libc
83-84- # Figure out what extra flags to pass to the gcc compilers
85- # being generated to make sure that they use our glibc.
86- extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
87- extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
8889- # The path to the Glibc binaries such as `crti.o'.
90- glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
91- glibc_libdir="$glibc_dir/lib"
92- glibc_devdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc-dev)"
93- configureFlags="$configureFlags --with-native-system-header-dir=$glibc_devdir/include"
9495- # Use *real* header files, otherwise a limits.h is generated
96- # that does not include Glibc's limits.h (notably missing
97- # SSIZE_MAX, which breaks the build).
98- NIX_FIXINC_DUMMY_CROSS="$glibc_devdir/include"
00000099100- extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
101- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
000102103- EXTRA_TARGET_CFLAGS="$extraFlags"
104- for i in $extraLDFlags; do
105- EXTRA_TARGET_LDFLAGS="$EXTRA_TARGET_LDFLAGS -Wl,$i"
106- done
107- fi
108 fi
109110 # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
111 # the startfiles.
112 # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
113 # for the startfiles.
114- makeFlagsArray+=( \
115- NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
116- SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
117- CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
118- CXXFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
119- CFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
120- CXXFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
121- FLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
122- LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
123- LDFLAGS_FOR_TARGET="$EXTRA_TARGET_LDFLAGS $EXTRA_TARGET_LDFLAGS" \
124- )
00000125126- if test -z "$targetConfig"; then
127- makeFlagsArray+=( \
128- BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
129- BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
130- )
00000131 fi
132133- if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
134 # We don't want the gcc build to assume there will be a libc providing
135 # limits.h in this stagae
136- makeFlagsArray+=( \
137- LIMITS_H_TEST=false \
138- )
139 else
140- makeFlagsArray+=( \
141- LIMITS_H_TEST=true \
142- )
143 fi
144fi
145146-if test -n "$targetConfig"; then
147 # The host strip will destroy some important details of the objects
148 dontStrip=1
149fi
00150151providedPreConfigure="$preConfigure";
152preConfigure() {
···1source $stdenv/setup
234+oldOpts="$(shopt -po nounset)" || true
5+set -euo pipefail
6+7+8+export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
9+mkdir "$NIX_FIXINC_DUMMY"
101112if test "$staticCompiler" = "1"; then
···171819# GCC interprets empty paths as ".", which we don't want.
20+if test -z "${CPATH-}"; then unset CPATH; fi
21+if test -z "${LIBRARY_PATH-}"; then unset LIBRARY_PATH; fi
22+echo "\$CPATH is \`${CPATH-}'"
23+echo "\$LIBRARY_PATH is \`${LIBRARY_PATH-}'"
2425if test "$noSysDirs" = "1"; then
2627+ declare \
28+ EXTRA_BUILD_FLAGS EXTRA_FLAGS EXTRA_TARGET_FLAGS \
29+ EXTRA_BUILD_LDFLAGS EXTRA_TARGET_LDFLAGS
000000003031+ for pre in 'BUILD_' ''; do
32+ curCC="NIX_${pre}CC"
33+ curFIXINC="NIX_${pre}FIXINC_DUMMY"
3435+ declare -a extraFlags=() extraLDFlags=()
36+ if [[ -e "${!curCC}/nix-support/orig-libc" ]]; then
37+ # Figure out what extra flags to pass to the gcc compilers being
38+ # generated to make sure that they use our glibc.
39+ extraFlags=($(cat "${!curCC}/nix-support/libc-cflags"))
40+ extraLDFlags=($(cat "${!curCC}/nix-support/libc-ldflags") $(cat "${!curCC}/nix-support/libc-ldflags-before" || true))
0000000000000004142+ # The path to the Glibc binaries such as `crti.o'.
43+ glibc_libdir="$(cat "${!curCC}/nix-support/orig-libc")/lib"
44+ glibc_devdir="$(cat "${!curCC}/nix-support/orig-libc-dev")"
04546+ # Use *real* header files, otherwise a limits.h is generated that
47+ # does not include Glibc's limits.h (notably missing SSIZE_MAX,
48+ # which breaks the build).
49+ declare NIX_${pre}FIXINC_DUMMY="$glibc_devdir/include"
00000000050 else
51+ # Hack: support impure environments.
52+ extraFlags=("-isystem" "/usr/include")
53+ extraLDFlags=("-L/usr/lib64" "-L/usr/lib")
54+ glibc_libdir="/usr/lib"
55+ declare NIX_${pre}FIXINC_DUMMY=/usr/include
56+ fi
0005758+ extraFlags=("-I${!curFIXINC}"
59+ "${extraFlags[@]}")
60+ extraLDFlags=("-L$glibc_libdir" "-rpath" "$glibc_libdir"
61+ "${extraLDFlags[@]}")
06263+ # BOOT_CFLAGS defaults to `-g -O2'; since we override it below, make
64+ # sure to explictly add them so that files compiled with the bootstrap
65+ # compiler are optimized and (optionally) contain debugging information
66+ # (info "(gccinstall) Building").
67+ if test -n "${dontStrip-}"; then
68+ extraFlags=("-O2" "-g" "${extraFlags[@]}")
69+ else
70+ # Don't pass `-g' at all; this saves space while building.
71+ extraFlags=("-O2" "${extraFlags[@]}")
72+ fi
7374+ declare EXTRA_${pre}FLAGS="${extraFlags[*]}"
75+ for i in "${extraLDFlags[@]}"; do
76+ declare EXTRA_${pre}LDFLAGS+=" -Wl,$i"
77+ done
78+ done
7980+ if test -z "${targetConfig-}"; then
81+ # host = target, so the flags are the same
82+ EXTRA_TARGET_FLAGS="$EXTRA_FLAGS"
83+ EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
084 fi
8586 # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
87 # the startfiles.
88 # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
89 # for the startfiles.
90+ makeFlagsArray+=(
91+ "BUILD_SYSTEM_HEADER_DIR=$NIX_BUILD_FIXINC_DUMMY"
92+ "SYSTEM_HEADER_DIR=$NIX_BUILD_FIXINC_DUMMY"
93+ "NATIVE_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY"
94+95+ "LDFLAGS_FOR_BUILD=$EXTRA_BUILD_LDFLAGS"
96+ #"LDFLAGS=$EXTRA_LDFLAGS"
97+ "LDFLAGS_FOR_TARGET=$EXTRA_TARGET_LDFLAGS"
98+99+ "CFLAGS_FOR_BUILD=$EXTRA_BUILD_FLAGS $EXTRA_BUILD_LDFLAGS"
100+ "CXXFLAGS_FOR_BUILD=$EXTRA_BUILD_FLAGS $EXTRA_BUILD_LDFLAGS"
101+ "FLAGS_FOR_BUILD=$EXTRA_BUILD_FLAGS $EXTRA_BUILD_LDFLAGS"
102+103+ # It seems there is a bug in GCC 5
104+ #"CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
105+ #"CXXFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
106107+ "CFLAGS_FOR_TARGET=$EXTRA_TARGET_FLAGS $EXTRA_TARGET_LDFLAGS"
108+ "CXXFLAGS_FOR_TARGET=$EXTRA_TARGET_FLAGS $EXTRA_TARGET_LDFLAGS"
109+ "FLAGS_FOR_TARGET=$EXTRA_TARGET_FLAGS $EXTRA_TARGET_LDFLAGS"
110+ )
111+112+ if test -z "${targetConfig-}"; then
113+ makeFlagsArray+=(
114+ "BOOT_CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
115+ "BOOT_LDFLAGS=$EXTRA_TARGET_FLAGS $EXTRA_TARGET_LDFLAGS"
116+ )
117 fi
118119+ if test -n "${targetConfig-}" -a "$crossStageStatic" == 1; then
120 # We don't want the gcc build to assume there will be a libc providing
121 # limits.h in this stagae
122+ makeFlagsArray+=(
123+ 'LIMITS_H_TEST=false'
124+ )
125 else
126+ makeFlagsArray+=(
127+ 'LIMITS_H_TEST=true'
128+ )
129 fi
130fi
131132+if test -n "${targetConfig-}"; then
133 # The host strip will destroy some important details of the objects
134 dontStrip=1
135fi
136+137+eval "$oldOpts"
138139providedPreConfigure="$preConfigure";
140preConfigure() {
···3}:
45stdenv.mkDerivation rec {
6- name = "gstreamer-editing-services-1.12.2";
78 meta = with stdenv.lib; {
9 description = "Library for creation of audio/video non-linear editors";
···3}:
45stdenv.mkDerivation rec {
6+ name = "gstreamer-editing-services-1.12.3";
78 meta = with stdenv.lib; {
9 description = "Library for creation of audio/video non-linear editors";
···14 buildInputs = [ pcre ];
15 nativeBuildInputs = [ cmake doxygen ];
16000017 meta = with stdenv.lib; {
18 homepage = http://editorconfig.org/;
19 description = "EditorConfig core library written in C";
···14 buildInputs = [ pcre ];
15 nativeBuildInputs = [ cmake doxygen ];
1617+ # Multiple doxygen can not generate man pages in the same base directory in
18+ # parallel: https://bugzilla.gnome.org/show_bug.cgi?id=791153
19+ enableParallelBuilding = false;
20+21 meta = with stdenv.lib; {
22 homepage = http://editorconfig.org/;
23 description = "EditorConfig core library written in C";