treewide: make -Wno-error flags clang-only

In 724e833ea2, I was a little too aggressive in enabling these flags.
Many don’t work in gcc, and we should probably avoid settings them
widely. This makes those flags optional on isclang
This commit is contained in:
Matthew Bauer 2019-04-29 21:28:43 -04:00
parent 84a15876a3
commit 74c784a79c
7 changed files with 8 additions and 7 deletions

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
./gcc6.patch
];
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = {
description = "Renders an image of the earth or other planets into the X root window";

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [cmake];
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with stdenv.lib; {
description = "Computational Morphometry Toolkit ";

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-Wno-error=argument-outside-range";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=argument-outside-range";
meta = with stdenv.lib; {
description = "A professional free 3D Game Multiphysics Library";

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
# /build/clucene-core-2.3.3.4/build/bin/cl_test"
doCheck = false;
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with stdenv.lib; {
description = "Core library for full-featured text search engine";

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = {
homepage = http://p7zip.sourceforge.net/;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
installFlags = "PREFIX=$(out)";
NIX_CFLAGS_COMPILE = "-Wno-error=reserved-user-defined-literal";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal";
meta = with stdenv.lib; {
homepage = http://compression.ca/pbzip2/;

View File

@ -53,7 +53,8 @@ stdenv.mkDerivation rec {
sed 's|LIBS += -lstdc++.6||' -i Makefile
'';
NIX_CFLAGS_COMPILE = [ "-fpermissive" "-Wno-error=reserved-user-defined-literal" ];
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]
++ stdenv.lib.optional stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal";
meta = with stdenv.lib; {
description = "High-speed web-based traffic analysis and flow collection tool";