diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-09-04 19:50:01 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2018-09-23 20:56:19 +0000 |
commit | e0b591919707f07fd1c42646c6deb13f0dd4914a (patch) | |
tree | f5da15da5b1ad8d11ff65d52e78acbf6b6c00a7b /pkgs/development | |
parent | 87c02060383a689e81749643a39dbcc3c4fc6ad1 (diff) | |
download | nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar.gz nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar.bz2 nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar.lz nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar.xz nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.tar.zst nixpkgs-e0b591919707f07fd1c42646c6deb13f0dd4914a.zip |
gcc-*: homogenize and cleanup expressions without a rebuild
Looks scary but it is a noop.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 12 |
7 files changed, 65 insertions, 57 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index d9376f597a7..8eadfbf898c 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,8 +206,9 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); - buildInputs = [ gmp mpfr libmpc libelf ] - ++ (optional (cloog != null) cloog) + buildInputs = [ + gmp mpfr libmpc libelf + ] ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) @@ -222,7 +220,6 @@ stdenv.mkDerivation ({ ++ (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 +351,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 +379,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 c60f54f1560..8a64cc79a9c 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 @@ -250,8 +247,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -376,7 +372,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 +394,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 +424,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 efd6ec07257..5357f10ab5e 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; @@ -164,7 +161,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz"; - inherit sha256; + sha256 = "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k"; }; inherit patches; @@ -397,10 +394,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,6 +424,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 4760d18a7d8..557c8ceba8a 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 = @@ -257,8 +255,7 @@ stdenv.mkDerivation ({ '' + stdenv.lib.optionalString (langJava || langGo) '' export lib=$out; - '' - ; + ''; dontDisableStatic = true; @@ -380,7 +377,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) @@ -401,10 +399,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; @@ -428,6 +429,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 e2c686b7e7e..85350f5a2b2 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 = @@ -344,10 +342,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; @@ -371,6 +372,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 59d7653c52c..9dac0235037 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 = @@ -335,10 +333,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; @@ -362,6 +363,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 0de6be36c35..96e05023743 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 = @@ -306,10 +304,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 +334,7 @@ stdenv.mkDerivation ({ platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ + stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; broken = true; |