diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2018-10-29 19:17:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 19:17:28 +0000 |
commit | 4a854344b707378dba7c69a9881361ca3ed47ce8 (patch) | |
tree | 0e544776d23f47a5fe5b8a74f8dac730501a24a5 /pkgs/development/compilers/gcc | |
parent | 1098abf4aff7f58257b0cca3edcabbec550cccdf (diff) | |
parent | 110f16e43ed4f246186e2ffa2f489a698a0b187c (diff) | |
download | nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar.gz nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar.bz2 nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar.lz nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar.xz nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.tar.zst nixlib-4a854344b707378dba7c69a9881361ca3ed47ce8.zip |
Merge pull request #48721 from oxij/tree/mass-rebuild-complicated-cleanups
treewide: mass rebuild complicated cleanups
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 35 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 17 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 21 | ||||
-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, 76 insertions, 76 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index d9376f597a70..cb0ae64f9d34 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 @@ -175,14 +172,14 @@ stdenv.mkDerivation ({ inherit patches; - hardeningDisable = [ "format" ]; - outputs = [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; libc_dev = stdenv.cc.libc_dev; + hardeningDisable = [ "format" ]; + postPatch = if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of @@ -209,20 +206,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" @@ -354,13 +358,13 @@ 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) ([ - "-idirafter ${libcCross.dev}/include" + "-idirafter ${getDev libcCross}/include" ] ++ optionals (! crossStageStatic) [ "-B${libcCross.out}/lib" ]); @@ -382,7 +386,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 c60f54f1560c..746beb01ecc8 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 @@ -183,8 +180,6 @@ stdenv.mkDerivation ({ inherit patches; - hardeningDisable = [ "format" ]; - outputs = if langJava || langGo then ["out" "man" "info"] else [ "out" "lib" "man" "info" ]; setOutputFlags = false; @@ -192,6 +187,8 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; + hardeningDisable = [ "format" ]; + postPatch = if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of @@ -234,8 +231,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) @@ -250,8 +245,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -263,7 +257,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}" ++ @@ -376,7 +371,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) @@ -397,10 +393,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -424,7 +423,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 47c849d2dcc8..eda5855dcf16 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; @@ -165,7 +162,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz"; - inherit sha256; + sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k"; }; inherit patches; @@ -239,12 +236,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"; @@ -403,10 +398,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -430,6 +428,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 eeb57be97157..2980d34fcc49 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -50,8 +50,6 @@ with builtins; let version = "6.4.0"; - enableParallelBuilding = true; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; patches = @@ -240,12 +238,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"; @@ -258,8 +253,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -386,7 +380,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) @@ -407,10 +402,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -434,6 +432,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 59897ccff426..3d96b4f03e06 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 = @@ -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_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; @@ -350,10 +345,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -377,6 +375,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 7842110a2146..239ebf22c4ac 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 = @@ -205,12 +203,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"; @@ -341,10 +336,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -368,6 +366,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 0de6be36c351..d2f2c2ee558a 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 = @@ -174,12 +172,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"; @@ -306,10 +301,13 @@ stdenv.mkDerivation ({ "-Wl,-rpath-link,${libcCross.out}/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; @@ -333,6 +331,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; broken = true; |