diff options
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 17 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 27 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 15 |
7 files changed, 73 insertions, 75 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index e40994a078e3..bcb724fd58c6 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -52,12 +52,9 @@ with builtins; let version = "4.8.5"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; - patches = [ ] - ++ optional enableParallelBuilding ../parallel-bconfig.patch + patches = [ ../parallel-bconfig.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional langFortran ../gfortran-driving.patch @@ -214,20 +211,27 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ gmp mpfr libmpc libelf ] - ++ (optional (cloog != null) cloog) + # For building runtime libs + depsBuildTarget = + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ]; + + buildInputs = [ + gmp mpfr libmpc libelf + targetPackages.stdenv.cc.bintools # For linking code at run-time + ] ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) ; - preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" @@ -359,8 +363,8 @@ stdenv.mkDerivation ({ ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ]) - ); + ++ optionals javaAwtGtk [ gmp mpfr ] + )); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -387,7 +391,8 @@ stdenv.mkDerivation ({ hardeningUnsupportedFlags = [ "stackprotector" ]; }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index bd5257b94a09..13ff4165a41c 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch +{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? stdenv.targetPlatform.isDarwin , langObjCpp ? stdenv.targetPlatform.isDarwin @@ -52,13 +52,10 @@ with builtins; let version = "4.9.4"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; patches = - [ ../use-source-date-epoch.patch ] - ++ optionals enableParallelBuilding [ ../parallel-bconfig.patch ./parallel-strsignal.patch ] + [ ../use-source-date-epoch.patch ../parallel-bconfig.patch ./parallel-strsignal.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional langFortran ../gfortran-driving.patch @@ -239,8 +236,6 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) @@ -255,8 +250,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -268,7 +262,8 @@ stdenv.mkDerivation ({ [ "--with-gmp-include=${gmp.dev}/include" "--with-gmp-lib=${gmp.out}/lib" - "--with-mpfr=${mpfr.dev}" + "--with-mpfr-include=${mpfr.dev}/include" + "--with-mpfr-lib=${mpfr.out}/lib" "--with-mpc=${libmpc}" ] ++ optional (libelf != null) "--with-libelf=${libelf}" ++ @@ -381,7 +376,8 @@ stdenv.mkDerivation ({ ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ])); + ++ optionals javaAwtGtk [ gmp mpfr ] + )); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -402,10 +398,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -429,7 +428,8 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ - stdenv.lib.platforms.illumos; + stdenv.lib.platforms.illumos ++ + stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 85b3d96e1368..a30cd6bbda97 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -49,9 +49,6 @@ with stdenv.lib; with builtins; let version = "5.5.0"; - sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k"; - - enableParallelBuilding = true; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -170,7 +167,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz"; - inherit sha256; + sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k"; }; inherit patches; @@ -244,12 +241,10 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; @@ -408,10 +403,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -435,6 +433,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 98e24900b01f..372a7065f2dc 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -48,9 +48,7 @@ assert langGo -> langCC; with stdenv.lib; with builtins; -let version = "6.4.0"; - - enableParallelBuilding = true; +let version = "6.5.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -59,8 +57,6 @@ let version = "6.4.0"; ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional langFortran ../gfortran-driving.patch - ++ [ ../struct-ucontext.patch ../struct-sigaltstack.patch ] # glibc-2.26 - ++ optional langJava [ ../struct-ucontext-libjava.patch ] # glibc-2.26 ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch ; @@ -170,7 +166,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5"; + sha256 = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby"; }; inherit patches; @@ -245,12 +241,9 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; @@ -263,8 +256,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -391,7 +383,8 @@ stdenv.mkDerivation ({ ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ])); + ++ optionals javaAwtGtk [ gmp mpfr ] + )); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -412,10 +405,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -439,6 +435,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 064d9eb6bc7b..094c26cbf696 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -39,8 +39,6 @@ with builtins; let version = "7.3.0"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; patches = @@ -221,12 +219,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; @@ -361,10 +356,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -388,6 +386,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index c6fea70cfbb7..1335666c54ce 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -39,8 +39,6 @@ with builtins; let version = "8.2.0"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; patches = @@ -210,12 +208,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; @@ -339,10 +334,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -366,6 +364,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index a308abd9c16f..c18189cd9496 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -40,8 +40,6 @@ with builtins; let version = "7-20170409"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; patches = @@ -179,12 +177,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; @@ -311,10 +306,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" ])); - passthru = - { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; + passthru = { + inherit langC langCC langObjC langObjCpp langFortran langGo version; + isGNU = true; + }; - inherit enableParallelBuilding enableMultilib; + enableParallelBuilding = true; + inherit enableMultilib; inherit (stdenv) is64bit; @@ -338,6 +336,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; broken = true; |