diff options
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/7.nix | 5 | ||||
-rw-r--r-- | pkgs/development/interpreters/gnu-apl/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/interpreters/spidermonkey/17.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/aspell/default.nix | 17 | ||||
-rw-r--r-- | pkgs/development/libraries/json-c/0.11.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/json-c/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/libidn/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/librevenge/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/libwps/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/ncurses/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/libraries/ncurses/gcc-5.patch | 46 | ||||
-rw-r--r-- | pkgs/development/libraries/usbredir/default.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/libsepol/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/reptyr/default.nix | 3 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/networking/dhcp/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 14 |
18 files changed, 75 insertions, 82 deletions
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 42ac766d2cc0..bbf87eccac75 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -33,7 +33,6 @@ , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null -, flex ? null , buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -295,7 +294,7 @@ stdenv.mkDerivation ({ ]; buildInputs = [ - gmp mpfr libmpc libelf flex + gmp mpfr libmpc libelf targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -408,9 +407,8 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = if bootstrap then - (if profiledCompiler then "profiledbootstrap" else "bootstrap") - else ""; + buildFlags = + optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); installTargets = if stripped @@ -523,7 +521,7 @@ stdenv.mkDerivation ({ } # Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; } +// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix index 372bb1532698..13f8bcfdb1de 100644 --- a/pkgs/development/compilers/openjdk/7.nix +++ b/pkgs/development/compilers/openjdk/7.nix @@ -69,7 +69,10 @@ let fontconfig perl file bootjdk ]; - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=deprecated-declarations" + "-Wno-error=format-overflow" # newly detected by gcc7 + ]; NIX_LDFLAGS = if minimal then null else "-lfontconfig -lXcursor -lXinerama"; diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index 4d38545a44f0..2f5ce0e76350 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -12,6 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ readline gettext ncurses ]; + # Needed with GCC 7 + NIX_CFLAGS_COMPILE = "-Wno-error=int-in-bool-context"; + patchPhase = optionalString stdenv.isDarwin '' substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h" ''; diff --git a/pkgs/development/interpreters/spidermonkey/17.nix b/pkgs/development/interpreters/spidermonkey/17.nix index da5fc193a222..9c47ebe79b6e 100644 --- a/pkgs/development/interpreters/spidermonkey/17.nix +++ b/pkgs/development/interpreters/spidermonkey/17.nix @@ -18,6 +18,16 @@ stdenv.mkDerivation rec { postUnpack = "sourceRoot=\${sourceRoot}/js/src"; + patches = [ + (fetchurl { + name = "jsoptparse-gcc7.patch"; + url = "https://src.fedoraproject.org/cgit/rpms/mozjs17.git/plain/" + + "mozjs17.0.0-gcc7.patch?id=43b846629a299f"; + sha256 = "17plyaq0jwf9wli4zlgvh4ri3zyk6nj1fiakh3wnd37nsl90raf9"; + }) + ]; + patchFlags = "-p3"; + postPatch = '' # Fixes an issue with version detection under perl 5.22.x sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix index cccd93e5d4dd..d0e93337a390 100644 --- a/pkgs/development/libraries/aspell/default.nix +++ b/pkgs/development/libraries/aspell/default.nix @@ -1,5 +1,6 @@ -{stdenv, fetchurl, perl -, searchNixProfiles ? true}: +{ stdenv, fetchurl, fetchpatch, perl +, searchNixProfiles ? true +}: stdenv.mkDerivation rec { name = "aspell-0.60.6.1"; @@ -9,10 +10,16 @@ stdenv.mkDerivation rec { sha256 = "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"; }; - patchPhase = '' + patches = [ + (fetchpatch { # remove in >= 0.60.7 + name = "gcc-7.patch"; + url = "https://github.com/GNUAspell/aspell/commit/8089fa02122fed0a.diff"; + sha256 = "1b3p1zy2lqr2fknddckm58hyk95hw4scf6hzjny1v9iaic2p37ix"; + }) + ] ++ stdenv.lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch; + + postPatch = '' patch interfaces/cc/aspell.h < ${./clang.patch} - '' + stdenv.lib.optionalString searchNixProfiles '' - patch -p1 < ${./data-dirs-from-nix-profiles.patch} ''; nativeBuildInputs = [ perl ]; diff --git a/pkgs/development/libraries/json-c/0.11.nix b/pkgs/development/libraries/json-c/0.11.nix index 029921ee08c0..8c4eab9ede6e 100644 --- a/pkgs/development/libraries/json-c/0.11.nix +++ b/pkgs/development/libraries/json-c/0.11.nix @@ -6,6 +6,9 @@ stdenv.mkDerivation rec { url = "https://github.com/json-c/json-c/archive/json-c-0.11-20130402.tar.gz"; sha256 = "1m8fy7lbahv1r7yqbhw4pl057sxmmgjihm1fsvc3h66710s2i24r"; }; + + NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + meta = with stdenv.lib; { description = "A JSON implementation in C"; homepage = https://github.com/json-c/json-c/wiki; diff --git a/pkgs/development/libraries/json-c/default.nix b/pkgs/development/libraries/json-c/default.nix index b8c72d9669e0..7317efc53f86 100644 --- a/pkgs/development/libraries/json-c/default.nix +++ b/pkgs/development/libraries/json-c/default.nix @@ -11,6 +11,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; # won't configure without it, no idea why + # probably OK after update: https://github.com/json-c/json-c/pull/365 + NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + # compatibility hack (for mypaint at least) postInstall = '' ln -s json-c.pc "$dev/lib/pkgconfig/json.pc" diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index 147d6bac2f99..54d669f1913b 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "info" "devdoc" ]; - doCheck = !stdenv.isDarwin && !stdenv.hostPlatform.isMusl; + # broken with gcc-7 + #doCheck = !stdenv.isDarwin && !stdenv.hostPlatform.isMusl; hardeningDisable = [ "format" ]; diff --git a/pkgs/development/libraries/librevenge/default.nix b/pkgs/development/libraries/librevenge/default.nix index 3523eb5c37bc..2c6e792ae8ce 100644 --- a/pkgs/development/libraries/librevenge/default.nix +++ b/pkgs/development/libraries/librevenge/default.nix @@ -21,11 +21,10 @@ stdenv.mkDerivation { inherit (s) url sha256; }; - # Clang generates warnings in Boost's header files + # Clang and gcc-7 generate warnings, and # -Werror causes these warnings to be interpreted as errors # Simplest solution: disable -Werror - configureFlags = if stdenv.cc.isClang - then [ "--disable-werror" ] else null; + configureFlags = [ "--disable-werror" ]; # Fix an issue with boost 1.59 # This is fixed upstream so please remove this when updating diff --git a/pkgs/development/libraries/libwps/default.nix b/pkgs/development/libraries/libwps/default.nix index 73fe5b55ab45..37ff9d098c5c 100644 --- a/pkgs/development/libraries/libwps/default.nix +++ b/pkgs/development/libraries/libwps/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ boost librevenge zlib ]; + NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; # newly detected by gcc-7 + meta = with stdenv.lib; { homepage = http://libwps.sourceforge.net/; description = "Microsoft Works document format import filter library"; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 0dd7b37e1a66..308a916b0bd0 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -11,23 +11,18 @@ }: stdenv.mkDerivation rec { - version = if abiVersion == "5" then "5.9" else "6.0-20171125"; - name = "ncurses-${version}"; + version = "6.0-20171125"; + name = "ncurses-${version}" + lib.optionalString (abiVersion == "5") "-abi5-compat"; - src = fetchurl (if abiVersion == "5" then { - url = "mirror://gnu/ncurses/${name}.tar.gz"; - sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh"; - } else { + src = fetchurl { urls = [ - "ftp://ftp.invisible-island.net/ncurses/current/${name}.tgz" - "https://invisible-mirror.net/archives/ncurses/current/${name}.tgz" + "ftp://ftp.invisible-island.net/ncurses/current/ncurses-${version}.tgz" + "https://invisible-mirror.net/archives/ncurses/current/ncurses-${version}.tgz" ]; sha256 = "11adzj0k82nlgpfrflabvqn2m7fmhp2y6pd7ivmapynxqb9vvb92"; - }); + }; - # Unnecessarily complicated in order to avoid mass-rebuilds - patches = lib.optional (!stdenv.cc.isClang || abiVersion == "5") ./clang.patch - ++ lib.optional (stdenv.cc.isGNU && abiVersion == "5") ./gcc-5.patch; + patches = lib.optional (!stdenv.cc.isClang) ./clang.patch; outputs = [ "out" "dev" "man" ]; setOutputFlags = false; # some aren't supported @@ -37,7 +32,8 @@ stdenv.mkDerivation rec { "--without-debug" "--enable-pc-files" "--enable-symlinks" - ] ++ lib.optional unicode "--enable-widec"; + ] ++ lib.optional unicode "--enable-widec" + ++ lib.optional (abiVersion == "5") "--with-abi-version=5"; # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; diff --git a/pkgs/development/libraries/ncurses/gcc-5.patch b/pkgs/development/libraries/ncurses/gcc-5.patch deleted file mode 100644 index 2448229b88e1..000000000000 --- a/pkgs/development/libraries/ncurses/gcc-5.patch +++ /dev/null @@ -1,46 +0,0 @@ -https://bugs.gentoo.org/545114 - -extracted from the upstream change (which had many unrelated commits in one) - -From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001 -From: "Thomas E. Dickey" <dickey@invisible-island.net> -Date: Sun, 7 Dec 2014 03:10:09 +0000 -Subject: [PATCH] ncurses 5.9 - patch 20141206 - -+ modify MKlib_gen.sh to work around change in development version of - gcc introduced here: - https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html - https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html - (reports by Marcus Shawcroft, Maohui Lei). - -diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh -index d8cc3c9..b91398c 100755 ---- a/ncurses/base/MKlib_gen.sh -+++ b/ncurses/base/MKlib_gen.sh -@@ -474,11 +474,22 @@ sed -n -f $ED1 \ - -e 's/gen_$//' \ - -e 's/ / /g' >>$TMP - -+cat >$ED1 <<EOF -+s/ / /g -+s/^ // -+s/ $// -+s/P_NCURSES_BOOL/NCURSES_BOOL/g -+EOF -+ -+# A patch discussed here: -+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html -+# introduces spurious #line markers. Work around that by ignoring the system's -+# attempt to define "bool" and using our own symbol here. -+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2 -+cat $ED2 >$TMP -+ - $preprocessor $TMP 2>/dev/null \ --| sed \ -- -e 's/ / /g' \ -- -e 's/^ //' \ -- -e 's/_Bool/NCURSES_BOOL/g' \ -+| sed -f $ED1 \ - | $AWK -f $AW2 \ - | sed -f $ED3 \ - | sed \ diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix index 4735375de1f9..507c494ea27d 100644 --- a/pkgs/development/libraries/usbredir/default.nix +++ b/pkgs/development/libraries/usbredir/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { }; # Works around bunch of "format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}'" warnings - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.is64bit) "-Wno-error=format"; + NIX_CFLAGS_COMPILE = stdenv.lib.optional (!stdenv.is64bit) "-Wno-error=format" + ++ [ "-Wno-error=format-truncation" ]; # newly detected with gcc-7 nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libusb ]; diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 0417bf59cfa3..f7f393afb39d 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { makeFlagsArray+=("DESTDIR=$out") ''; + NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + passthru = { inherit se_release se_url; }; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/reptyr/default.nix b/pkgs/os-specific/linux/reptyr/default.nix index 779337e85f86..4b83e478dd1c 100644 --- a/pkgs/os-specific/linux/reptyr/default.nix +++ b/pkgs/os-specific/linux/reptyr/default.nix @@ -13,6 +13,9 @@ stdenv.mkDerivation rec { sed 1i'#include <sys/sysmacros.h>' -i platform/linux/linux.c ''; + # Needed with GCC 7 + NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation"; + makeFlags = ["PREFIX=$(out)"]; meta = { platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 249f788c17ae..703800deb2ad 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -248,9 +248,9 @@ in gmp = super.gmp.override { stdenv = self.makeStaticLibraries self.stdenv; }; mpfr = super.mpfr.override { stdenv = self.makeStaticLibraries self.stdenv; }; libmpc = super.libmpc.override { stdenv = self.makeStaticLibraries self.stdenv; }; - isl_0_14 = super.isl_0_14.override { stdenv = self.makeStaticLibraries self.stdenv; }; + isl_0_17 = super.isl_0_17.override { stdenv = self.makeStaticLibraries self.stdenv; }; gcc-unwrapped = super.gcc-unwrapped.override { - isl = isl_0_14; + isl = isl_0_17; }; }; extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++ diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index e7a593ff830c..1812e95dcbb7 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { "--localstatedir=/var" ] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ]; + NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-compare" ]; + installFlags = [ "DESTDIR=\${out}" ]; postInstall = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 948a6afb31ce..40e1e9899f38 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5763,8 +5763,8 @@ with pkgs; gambit = callPackage ../development/compilers/gambit { }; gerbil = callPackage ../development/compilers/gerbil { }; - gccFun = callPackage ../development/compilers/gcc/6; - gcc = gcc6; + gccFun = callPackage ../development/compilers/gcc/7; + gcc = gcc7; gcc-unwrapped = gcc.cc; gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { @@ -6417,6 +6417,8 @@ with pkgs; }; libxml2 = libxml2.override { pythonSupport = false; }; python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; }; + } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' }); manticore = callPackage ../development/compilers/manticore { }; @@ -10372,8 +10374,12 @@ with pkgs; notify-sharp = callPackage ../development/libraries/notify-sharp { }; - ncurses5 = callPackage ../development/libraries/ncurses { abiVersion = "5"; }; - ncurses6 = callPackage ../development/libraries/ncurses { abiVersion = "6"; }; + ncurses5 = callPackage ../development/libraries/ncurses { + abiVersion = "5"; + }; + ncurses6 = callPackage ../development/libraries/ncurses { + abiVersion = "6"; + }; ncurses = ncurses6; neardal = callPackage ../development/libraries/neardal { }; |