Merge #206907: stdenv: gcc11 -> gcc12

+384 -26
+6
pkgs/applications/audio/aether-lv2/default.nix
··· 18 18 lv2 libX11 libGL libGLU mesa 19 19 ]; 20 20 21 + NIX_CFLAGS_COMPILE = [ 22 + # Needed with GCC 12 23 + "-Wno-error=array-bounds" 24 + "-Wno-error=stringop-overflow" 25 + ]; 26 + 21 27 installPhase = '' 22 28 mkdir -p $out/lib/lv2 23 29 cp -r aether.lv2 $out/lib/lv2
+6
pkgs/applications/audio/furnace/default.nix
··· 63 63 "-DWARNINGS_ARE_ERRORS=ON" 64 64 ]; 65 65 66 + NIX_CFLAGS_COMPILE = [ 67 + # Needed with GCC 12 68 + "-Wno-error=mismatched-new-delete" 69 + "-Wno-error=use-after-free" 70 + ]; 71 + 66 72 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 67 73 # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a 68 74 # bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access
+5
pkgs/applications/audio/mimic/default.nix
··· 38 38 pcre2 39 39 ] ++ lib.optional pulseaudioSupport libpulseaudio; 40 40 41 + NIX_CFLAGS_COMPILE = [ 42 + # Needed with GCC 12 43 + "-Wno-error=free-nonheap-object" 44 + ]; 45 + 41 46 postInstall = '' 42 47 wrapProgram $out/bin/mimic \ 43 48 --run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib"
+4
pkgs/applications/emulators/mame/default.nix
··· 117 117 --subst-var-by mamePath "$out/opt/mame" 118 118 ''; 119 119 120 + NIX_CFLAGS_COMPILE = [ 121 + "-Wno-error=use-after-free" 122 + ]; 123 + 120 124 desktopItems = [ 121 125 (makeDesktopItem { 122 126 name = "MAME";
+5
pkgs/applications/graphics/foxotron/default.nix
··· 46 46 ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ] 47 47 ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ]; 48 48 49 + NIX_CFLAGS_COMPILE = [ 50 + # Needed with GCC 12 51 + "-Wno-error=array-bounds" 52 + ]; 53 + 49 54 installPhase = '' 50 55 runHook preInstall 51 56
+6
pkgs/applications/graphics/goxel/default.nix
··· 16 16 17 17 nativeBuildInputs = [ scons pkg-config wrapGAppsHook ]; 18 18 buildInputs = [ glfw3 gtk3 libpng12 ]; 19 + 20 + NIX_CFLAGS_COMPILE = [ 21 + # Needed with GCC 12 22 + "-Wno-error=format-truncation" 23 + ]; 24 + 19 25 NIX_LDFLAGS = "-lpthread"; 20 26 21 27 buildPhase = ''
+6
pkgs/applications/misc/lyx/default.nix
··· 11 11 sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng="; 12 12 }; 13 13 14 + # Needed with GCC 12 15 + postPatch = '' 16 + sed '1i#include <iterator>' -i src/lyxfind.cpp 17 + sed '1i#include <cstring>' -i src/insets/InsetListings.cpp 18 + ''; 19 + 14 20 # LaTeX is used from $PATH, as people often want to have it with extra pkgs 15 21 nativeBuildInputs = [ pkg-config makeWrapper ]; 16 22 buildInputs = [
+9 -1
pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix
··· 1 - { lib, stdenv, fetchFromGitHub 1 + { lib, stdenv, fetchFromGitHub, fetchpatch 2 2 , pkg-config, cmake, ninja, yasm 3 3 , libjpeg, openssl_1_1, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf 4 4 , openh264, usrsctp, libevent, libvpx ··· 29 29 libX11 libXtst libXcomposite libXdamage libXext libXrender libXrandr libXi 30 30 glib abseil-cpp pcre util-linuxMinimal libselinux libsepol pipewire 31 31 mesa libepoxy libglvnd 32 + ]; 33 + 34 + patches = [ 35 + # GCC 12 Fix 36 + (fetchpatch { 37 + url = "https://github.com/desktop-app/tg_owt/pull/101/commits/86d2bcd7afb8706663d29e30f65863de5a626142.patch"; 38 + hash = "sha256-iWS0mB8R0vqPU/0qf6Ax54UCAKYDVCPac2mi/VHbFm0="; 39 + }) 32 40 ]; 33 41 34 42 cmakeFlags = [
+5
pkgs/applications/science/biology/octopus/default.nix
··· 19 19 sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY="; 20 20 }) ]; 21 21 22 + NIX_CFLAGS_COMPILE = [ 23 + # Needed with GCC 12 24 + "-Wno-error=deprecated-declarations" 25 + ]; 26 + 22 27 postInstall = '' 23 28 mkdir $out/bin 24 29 mv $out/octopus $out/bin
+7 -3
pkgs/applications/science/logic/cbmc/default.nix
··· 60 60 --prefix PATH : "$out/share/cbmc" \ 61 61 ''; 62 62 63 - # fix "argument unused during compilation" 64 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang 65 - "-Wno-unused-command-line-argument"; 63 + NIX_CFLAGS_COMPILE = [ 64 + # Needed with GCC 12 65 + "-Wno-error=maybe-uninitialized" 66 + ] ++ lib.optionals stdenv.cc.isClang [ 67 + # fix "argument unused during compilation" 68 + "-Wno-unused-command-line-argument" 69 + ]; 66 70 67 71 # TODO: add jbmc support 68 72 cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ];
+6
pkgs/applications/science/math/mxnet/default.nix
··· 54 54 ] else [ "-DUSE_CUDA=OFF" ]) 55 55 ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF"; 56 56 57 + NIX_CFLAGS_COMPILE = [ 58 + # Needed with GCC 12 59 + "-Wno-error=maybe-uninitialized" 60 + "-Wno-error=uninitialized" 61 + ]; 62 + 57 63 postPatch = '' 58 64 substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \ 59 65 --replace "/bin/bash" "${bash}/bin/bash"
+5
pkgs/applications/version-management/fnc/default.nix
··· 13 13 14 14 makeFlags = [ "PREFIX=$(out)" ]; 15 15 16 + NIX_CFLAGS_COMPILE = [ 17 + # Needed with GCC 12 18 + "-Wno-error=maybe-uninitialized" 19 + ]; 20 + 16 21 preInstall = '' 17 22 mkdir -p $out/bin 18 23 '';
+6
pkgs/development/compilers/mit-scheme/default.nix
··· 49 49 runHook postConfigure 50 50 ''; 51 51 52 + NIX_CFLAGS_COMPILE = [ 53 + # Needed with GCC 12 54 + "-Wno-error=array-parameter" 55 + "-Wno-error=use-after-free" 56 + ]; 57 + 52 58 buildPhase = '' 53 59 runHook preBuild 54 60 cd src
+5
pkgs/development/compilers/urweb/default.nix
··· 33 33 -L${sqlite.out}/lib"; 34 34 ''; 35 35 36 + NIX_CFLAGS_COMPILE = [ 37 + # Needed with GCC 12 38 + "-Wno-error=use-after-free" 39 + ]; 40 + 36 41 # Be sure to keep the statically linked libraries 37 42 dontDisableStatic = true; 38 43
+4
pkgs/development/interpreters/gnu-apl/default.nix
··· 21 21 "-Wno-error=maybe-uninitialized" 22 22 # Needed with GCC 11 23 23 "-Wno-error=misleading-indentation" 24 + # Needed with GCC 12 25 + "-Wno-error=nonnull" 26 + "-Wno-error=stringop-overflow" 27 + "-Wno-error=use-after-free" 24 28 ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference"); 25 29 26 30 patchPhase = lib.optionalString stdenv.isDarwin ''
+5
pkgs/development/libraries/assimp/default.nix
··· 23 23 24 24 cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ]; 25 25 26 + NIX_CFLAGS_COMPILE = [ 27 + # Needed with GCC 12 28 + "-Wno-error=array-bounds" 29 + ]; 30 + 26 31 meta = with lib; { 27 32 description = "A library to import various 3D model formats"; 28 33 homepage = "https://www.assimp.org/";
+2
pkgs/development/libraries/belle-sip/default.nix
··· 34 34 "-Wno-error=deprecated-declarations" 35 35 "-Wno-error=format-truncation" 36 36 "-Wno-error=stringop-overflow" 37 + # Needed with GCC 12 38 + "-Wno-error=use-after-free" 37 39 ]; 38 40 39 41 propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ];
+5
pkgs/development/libraries/boringssl/default.nix
··· 30 30 export GOARCH=$(go env GOHOSTARCH) 31 31 ''; 32 32 33 + NIX_CFLAGS_COMPILE = [ 34 + # Needed with GCC 12 35 + "-Wno-error=stringop-overflow" 36 + ]; 37 + 33 38 buildPhase = '' 34 39 ninjaBuildPhase 35 40 '';
+5
pkgs/development/libraries/bzrtp/default.nix
··· 25 25 # Do not build static libraries 26 26 cmakeFlags = [ "-DENABLE_STATIC=NO" "-DCMAKE_C_FLAGS=-Wno-error=cast-function-type" ]; 27 27 28 + NIX_CFLAGS_COMPILE = [ 29 + # Needed with GCC 12 30 + "-Wno-error=stringop-overflow" 31 + ]; 32 + 28 33 meta = with lib; { 29 34 description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project."; 30 35 homepage = "https://gitlab.linphone.org/BC/public/bzrtp";
+8 -5
pkgs/development/libraries/clucene-core/2.x.nix
··· 30 30 "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT=" 31 31 ]; 32 32 33 - patches = # From debian 34 - [ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch 35 - ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch 36 - ./Install-contribs-lib.patch 37 - ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; 33 + patches = [ 34 + # From debian 35 + ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch 36 + ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch 37 + ./Install-contribs-lib.patch 38 + # From arch 39 + ./fix-missing-include-time.patch 40 + ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; 38 41 39 42 # fails with "Unable to find executable: 40 43 # /build/clucene-core-2.3.3.4/build/bin/cl_test"
+49
pkgs/development/libraries/clucene-core/fix-missing-include-time.patch
··· 1 + From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001 2 + From: Stephan Bergmann <sbergman@redhat.com> 3 + Date: Wed, 12 Oct 2022 08:40:49 +0200 4 + Subject: [PATCH] Fix missing #include <time.h> 5 + MIME-Version: 1.0 6 + Content-Type: text/plain; charset=UTF-8 7 + Content-Transfer-Encoding: 8bit 8 + 9 + At least on recent Fedora 37 beta, building now failed with 10 + 11 + > CLucene/document/DateTools.cpp:26:19: error: ‘gmtime’ was not declared in this scope 12 + > 26 | tm *ptm = gmtime(&secs); 13 + > | ^~~~~~ 14 + 15 + etc. 16 + 17 + As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id: 18 + https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672 19 + 20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out 20 + _CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for 21 + anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools 22 + and deprecating DateField. DateTools still requires some testing and its own 23 + unit testing" on 2008-06-29 had introduced this use of it (into then 24 + src/CLucene/document/DateTools.H). And apparently most build environments have 25 + silently been happy ever since when the dead leading check for 26 + _CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the 27 + following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not 28 + <time.h>. 29 + --- 30 + src/shared/CLucene/clucene-config.h.cmake | 3 +-- 31 + 1 file changed, 1 insertion(+), 2 deletions(-) 32 + 33 + diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake 34 + index bd8683a5..6fe0f92b 100644 35 + --- a/src/shared/CLucene/clucene-config.h.cmake 36 + +++ b/src/shared/CLucene/clucene-config.h.cmake 37 + @@ -100,8 +100,7 @@ ${SYMBOL__T} 38 + //#cmakedefine _CL_STAT_MACROS_BROKEN 39 + 40 + /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ 41 + -//not actually used for anything... 42 + -//#cmakedefine _CL_TIME_WITH_SYS_TIME 1 43 + +#cmakedefine _CL_TIME_WITH_SYS_TIME 1 44 + 45 + /* Define that we will be using -fvisibility=hidden, and 46 + * make public classes visible using __attribute__ ((visibility("default"))) 47 + -- 48 + 2.37.3 49 +
+2
pkgs/development/libraries/cpp-ipfs-http-client/default.nix
··· 24 24 25 25 NIX_CFLAGS_COMPILE = [ 26 26 "-Wno-error=range-loop-construct" 27 + # Needed with GCC 12 28 + "-Wno-error=deprecated-declarations" 27 29 ]; 28 30 29 31 meta = with lib; {
+8
pkgs/development/libraries/gsmlib/default.nix
··· 2 2 stdenv.mkDerivation rec { 3 3 pname = "gsmlib"; 4 4 version = "unstable-2017-10-06"; 5 + 5 6 src = fetchFromGitHub { 6 7 owner = "x-logLT"; 7 8 repo = "gsmlib"; 8 9 rev = "4f794b14450132f81673f7d3570c5a859aecf7ae"; 9 10 sha256 = "16v8aj914ac1ipf14a867ljib3gy7fhzd9ypxnsg9l0zi8mm3ml5"; 10 11 }; 12 + 11 13 nativeBuildInputs = [ autoreconfHook ]; 14 + 15 + NIX_CFLAGS_COMPILE = [ 16 + # Needed with GCC 12 17 + "-std=c++14" 18 + ]; 19 + 12 20 meta = with lib; { 13 21 description = "Library to access GSM mobile phones through GSM modems"; 14 22 homepage = "https://github.com/x-logLT/gsmlib";
+6
pkgs/development/libraries/iqueue/default.nix
··· 12 12 nativeBuildInputs = [ pkg-config ]; 13 13 buildInputs = [ libbsd microsoft_gsl ]; 14 14 15 + NIX_CFLAGS_COMPILE = [ 16 + # Needed with GCC 12 17 + "-Wno-error=array-parameter" 18 + "-Wno-error=misleading-indentation" 19 + ]; 20 + 15 21 meta = with lib; { 16 22 homepage = "https://github.com/twosigma/iqueue"; 17 23 description = "Indexed queue";
+5
pkgs/development/libraries/libbladeRF/default.nix
··· 46 46 "-DBLADERF_GROUP=bladerf" 47 47 ]; 48 48 49 + NIX_CFLAGS_COMPILE = [ 50 + # Needed with GCC 12 51 + "-Wno-error=array-bounds" 52 + ]; 53 + 49 54 hardeningDisable = [ "fortify" ]; 50 55 51 56 meta = with lib; {
+5
pkgs/development/libraries/libcli/default.nix
··· 24 24 25 25 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" "PREFIX=$(out)" ]; 26 26 27 + NIX_CFLAGS_COMPILE = [ 28 + # Needed with GCC 12 29 + "-Wno-error=address" 30 + ]; 31 + 27 32 meta = with lib; { 28 33 description = "Emulate a Cisco-style telnet command-line interface"; 29 34 homepage = "http://sites.dparrish.com/libcli";
+4 -1
pkgs/development/libraries/libdynd/default.nix
··· 15 15 "-DDYND_BUILD_BENCHMARKS=OFF" 16 16 ]; 17 17 18 - # added to fix build with gcc7+ 19 18 NIX_CFLAGS_COMPILE = builtins.toString [ 19 + # added to fix build with gcc7+ 20 20 "-Wno-error=implicit-fallthrough" 21 21 "-Wno-error=nonnull" 22 22 "-Wno-error=tautological-compare" 23 23 "-Wno-error=class-memaccess" 24 24 "-Wno-error=parentheses" 25 25 "-Wno-error=deprecated-copy" 26 + # Needed with GCC 12 27 + "-Wno-error=deprecated-declarations" 28 + "-Wno-error=maybe-uninitialized" 26 29 ]; 27 30 28 31 nativeBuildInputs = [ cmake ];
+5
pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix
··· 19 19 "--with-x-locale-root=${libX11.out}/share/X11/locale" 20 20 ]; 21 21 22 + NIX_CFLAGS_COMPILE = [ 23 + # Needed with GCC 12 24 + "-Wno-error=array-bounds" 25 + ]; 26 + 22 27 preBuild = lib.optionalString stdenv.isDarwin '' 23 28 sed -i 's/,--version-script=.*$//' Makefile 24 29 '';
+6
pkgs/development/libraries/octomap/default.nix
··· 10 10 rev = "v${version}"; 11 11 hash = "sha256-qE5i4dGugm7tR5tgDCpbla/R7hYR/PI8BzrZQ4y6Yz8="; 12 12 }; 13 + 13 14 sourceRoot = "source/octomap"; 14 15 15 16 nativeBuildInputs = [ cmake ]; 17 + 18 + NIX_CFLAGS_COMPILE = [ 19 + # Needed with GCC 12 20 + "-Wno-error=deprecated-declarations" 21 + ]; 16 22 17 23 meta = with lib; { 18 24 description = "A probabilistic, flexible, and compact 3D mapping library for robotic systems";
+5
pkgs/development/libraries/opendbx/default.nix
··· 19 19 20 20 buildInputs = [ readline libmysqlclient postgresql sqlite ]; 21 21 22 + NIX_CFLAGS_COMPILE = [ 23 + # Needed with GCC 12 24 + "-std=c++14" 25 + ]; 26 + 22 27 meta = with lib; { 23 28 broken = stdenv.isDarwin; 24 29 description = "Extremely lightweight but extensible database access library written in C";
+10 -2
pkgs/development/libraries/rocksdb/default.nix
··· 36 36 "tools" 37 37 ]; 38 38 39 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=deprecated-copy -Wno-error=pessimizing-move" 40 - + lib.optionalString stdenv.cc.isClang "-Wno-error=unused-private-field -faligned-allocation"; 39 + NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ 40 + "-Wno-error=deprecated-copy" 41 + "-Wno-error=pessimizing-move" 42 + # Needed with GCC 12 43 + "-Wno-error=format-truncation" 44 + "-Wno-error=maybe-uninitialized" 45 + ] ++ lib.optionals stdenv.cc.isClang [ 46 + "-Wno-error=unused-private-field" 47 + "-faligned-allocation" 48 + ]; 41 49 42 50 cmakeFlags = [ 43 51 "-DPORTABLE=1"
+5
pkgs/development/libraries/roctracer/default.nix
··· 62 62 "-DCMAKE_INSTALL_INCLUDEDIR=include" 63 63 ]; 64 64 65 + NIX_CFLAGS_COMPILE = [ 66 + # Needed with GCC 12 67 + "-Wno-error=array-bounds" 68 + ]; 69 + 65 70 postPatch = '' 66 71 export HIP_DEVICE_LIB_PATH=${rocm-device-libs}/amdgcn/bitcode 67 72 '' + lib.optionalString (!buildTests) ''
+6
pkgs/development/libraries/swiftshader/default.nix
··· 13 13 nativeBuildInputs = [ cmake python3 jq ]; 14 14 buildInputs = [ libX11 libXext zlib ]; 15 15 16 + NIX_CFLAGS_COMPILE = [ 17 + # Needed with GCC 12 18 + "-Wno-error=array-bounds" 19 + "-Wno-error=uninitialized" 20 + ]; 21 + 16 22 # Make sure we include the drivers and icd files in the output as the cmake 17 23 # generated install command only puts in the spirv-tools stuff. 18 24 installPhase = ''
+14 -1
pkgs/development/libraries/unittest-cpp/default.nix
··· 1 - {lib, stdenv, fetchFromGitHub, cmake}: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , cmake 6 + }: 2 7 3 8 stdenv.mkDerivation rec { 4 9 pname = "unittest-cpp"; ··· 10 15 rev = "v${version}"; 11 16 sha256 = "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i"; 12 17 }; 18 + 19 + patches = [ 20 + # GCC12 Patch 21 + (fetchpatch { 22 + url = "https://github.com/unittest-cpp/unittest-cpp/pull/185/commits/f361c2a1034c02ba8059648f9a04662d6e2b5553.patch"; 23 + hash = "sha256-xyhV2VBelw/uktUXSZ3JBxgG+8/Mout/JiXEZVV2+2Y="; 24 + }) 25 + ]; 13 26 14 27 nativeBuildInputs = [ cmake ]; 15 28
+6 -1
pkgs/development/libraries/uri/default.nix
··· 11 11 sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd"; 12 12 }; 13 13 14 - NIX_CFLAGS_COMPILE = "-Wno-error=parentheses"; 14 + NIX_CFLAGS_COMPILE = [ 15 + "-Wno-error=parentheses" 16 + # Needed with GCC 12 17 + "-Wno-error=deprecated-declarations" 18 + "-Wno-error=nonnull" 19 + ]; 15 20 16 21 nativeBuildInputs = [ cmake doxygen ]; 17 22
+1
pkgs/development/tools/analysis/rr/default.nix
··· 24 24 postPatch = '' 25 25 substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' 26 26 sed '7i#include <math.h>' -i src/Scheduler.cc 27 + sed '1i#include <ctime>' -i src/test-monitor/test-monitor.cc 27 28 patchShebangs . 28 29 ''; 29 30
+1
pkgs/development/tools/profiling/systemtap/default.nix
··· 19 19 nativeBuildInputs = [ pkg-config cpio python3 python3.pkgs.setuptools ]; 20 20 buildInputs = [ elfutils gettext ]; 21 21 enableParallelBuilding = true; 22 + NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12 22 23 }; 23 24 24 25 ## a kernel build dir as expected by systemtap
+5
pkgs/development/tools/wlcs/default.nix
··· 47 47 wayland 48 48 ]; 49 49 50 + NIX_CFLAGS_COMPILE = [ 51 + # Needed with GCC 12 52 + "-Wno-error=maybe-uninitialized" 53 + ]; 54 + 50 55 passthru.updateScript = gitUpdater { 51 56 rev-prefix = "v"; 52 57 };
+5
pkgs/games/cataclysm-dda/stable.nix
··· 44 44 "VERSION=${version}" 45 45 ]; 46 46 47 + NIX_CFLAGS_COMPILE = [ 48 + # Needed with GCC 12 49 + "-Wno-error=array-bounds" 50 + ]; 51 + 47 52 meta = common.meta // { 48 53 maintainers = with lib.maintainers; 49 54 common.meta.maintainers ++ [ skeidel ];
+5
pkgs/games/cdogs-sdl/default.nix
··· 31 31 "-DCMAKE_C_FLAGS=-Wno-error=array-bounds" 32 32 ]; 33 33 34 + NIX_CFLAGS_COMPILE = [ 35 + # Needed with GCC 12 36 + "-Wno-error=stringop-overflow" 37 + ]; 38 + 34 39 nativeBuildInputs = [ 35 40 pkg-config 36 41 cmake
+8
pkgs/games/gimx/default.nix
··· 38 38 ''; 39 39 40 40 makeFlags = [ "build-core" ]; 41 + 42 + NIX_CFLAGS_COMPILE = [ 43 + # Needed with GCC 12 44 + "-Wno-error=address" 45 + "-Wno-error=deprecated-declarations" 46 + "-Wno-error=use-after-free" 47 + ]; 48 + 41 49 installPhase = '' 42 50 runHook preInstall 43 51
+6 -3
pkgs/games/liquidwar/default.nix
··· 30 30 31 31 hardeningDisable = [ "format" ]; 32 32 33 - NIX_CFLAGS_COMPILE = 34 - "-Wno-error=deprecated-declarations" + 33 + NIX_CFLAGS_COMPILE = [ 34 + "-Wno-error=deprecated-declarations" 35 + # Needed with GCC 12 36 + "-Wno-error=address" 37 + "-Wno-error=use-after-free" 35 38 # Avoid GL_GLEXT_VERSION double definition 36 39 " -DNO_SDL_GLEXT" 37 - ; 40 + ]; 38 41 39 42 # To avoid problems finding SDL_types.h. 40 43 configureFlags = [ "CFLAGS=-I${lib.getDev SDL}/include/SDL" ];
+5
pkgs/games/openrct2/default.nix
··· 94 94 "-DDOWNLOAD_TITLE_SEQUENCES=OFF" 95 95 ]; 96 96 97 + NIX_CFLAGS_COMPILE = [ 98 + # Needed with GCC 12 99 + "-Wno-error=maybe-uninitialized" 100 + ]; 101 + 97 102 postUnpack = '' 98 103 cp -r ${objects-src} $sourceRoot/data/object 99 104 cp -r ${title-sequences-src} $sourceRoot/data/sequence
+5
pkgs/os-specific/linux/anbox/default.nix
··· 85 85 systemd 86 86 ]; 87 87 88 + NIX_CFLAGS_COMPILE = [ 89 + # Needed with GCC 12 90 + "-Wno-error=mismatched-new-delete" 91 + ]; 92 + 88 93 patchPhase = '' 89 94 patchShebangs scripts 90 95
+2 -2
pkgs/os-specific/linux/kernel/hardened/config.nix
··· 65 65 # Gather additional entropy at boot time for systems that may not have appropriate entropy sources. 66 66 GCC_PLUGIN_LATENT_ENTROPY = yes; 67 67 68 - GCC_PLUGIN_STRUCTLEAK = yes; # A port of the PaX structleak plugin 69 - GCC_PLUGIN_STRUCTLEAK_BYREF_ALL = yes; # Also cover structs passed by address 68 + GCC_PLUGIN_STRUCTLEAK = option yes; # A port of the PaX structleak plugin 69 + GCC_PLUGIN_STRUCTLEAK_BYREF_ALL = option yes; # Also cover structs passed by address 70 70 GCC_PLUGIN_STACKLEAK = whenAtLeast "4.20" yes; # A port of the PaX stackleak plugin 71 71 GCC_PLUGIN_RANDSTRUCT = whenOlder "5.19" yes; # A port of the PaX randstruct plugin 72 72 GCC_PLUGIN_RANDSTRUCT_PERFORMANCE = whenOlder "5.19" yes;
+7
pkgs/os-specific/linux/odp-dpdk/default.nix
··· 25 25 autoreconfHook 26 26 pkg-config 27 27 ]; 28 + 28 29 buildInputs = [ 29 30 dpdk_19_11 30 31 libconfig ··· 36 37 libelf 37 38 jansson 38 39 libbpf 40 + ]; 41 + 42 + NIX_CFLAGS_COMPILE = [ 43 + # Needed with GCC 12 44 + "-Wno-error=maybe-uninitialized" 45 + "-Wno-error=uninitialized" 39 46 ]; 40 47 41 48 # binaries will segfault otherwise
+6
pkgs/os-specific/linux/pktgen/default.nix
··· 46 46 RTE_SDK = dpdk; 47 47 GUI = lib.optionalString withGtk "true"; 48 48 49 + NIX_CFLAGS_COMPILE = [ 50 + # Needed with GCC 12 51 + "-Wno-error=address" 52 + "-Wno-error=use-after-free" 53 + ]; 54 + 49 55 # requires symbols from this file 50 56 NIX_LDFLAGS = "-lrte_net_bond"; 51 57
+5
pkgs/servers/foundationdb/cmake.nix
··· 60 60 (lib.optionalString (!useClang) "-DUSE_LD=GOLD") 61 61 ]; 62 62 63 + NIX_CFLAGS_COMPILE = [ 64 + # Needed with GCC 12 65 + "-Wno-error=missing-template-keyword" 66 + ]; 67 + 63 68 inherit patches; 64 69 65 70 # fix up the use of the very weird and custom 'fdb_install' command by just
+6
pkgs/servers/osrm-backend/default.nix
··· 15 15 16 16 buildInputs = [ bzip2 libxml2 libzip boost lua luabind tbb expat ]; 17 17 18 + NIX_CFLAGS_COMPILE = [ 19 + # Needed with GCC 12 20 + "-Wno-error=stringop-overflow" 21 + "-Wno-error=uninitialized" 22 + ]; 23 + 18 24 postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles"; 19 25 20 26 meta = {
+2
pkgs/servers/tvheadend/default.nix
··· 78 78 NIX_CFLAGS_COMPILE = [ 79 79 "-Wno-error=format-truncation" 80 80 "-Wno-error=stringop-truncation" 81 + # Needed with GCC 12 82 + "-Wno-error=use-after-free" 81 83 ]; 82 84 83 85 configureFlags = [
+5
pkgs/servers/x11/xorg/overrides.nix
··· 887 887 "--disable-tls" 888 888 ]; 889 889 890 + NIX_CFLAGS_COMPILE = [ 891 + # Needed with GCC 12 892 + "-Wno-error=array-bounds" 893 + ]; 894 + 890 895 postInstall = '' 891 896 rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it 892 897 ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
+4 -1
pkgs/tools/admin/tigervnc/default.nix
··· 34 34 sha256 = "sha256-77X+AvHFWfYYIio3c+EYf11jg/1IbYhNUweRIDHMOZw="; 35 35 }; 36 36 37 - 38 37 patches = [ 39 38 (fetchpatch { 40 39 url = "https://patch-diff.githubusercontent.com/raw/TigerVNC/tigervnc/pull/1383.patch"; ··· 63 62 "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" 64 63 "-DCMAKE_INSTALL_SBINDIR=${placeholder "out"}/bin" 65 64 "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "out"}/bin" 65 + ]; 66 + 67 + NIX_CFLAGS_COMPILE = [ 68 + "-Wno-error=array-bounds" 66 69 ]; 67 70 68 71 postBuild = lib.optionalString stdenv.isLinux ''
+5 -2
pkgs/tools/audio/mpris-scrobbler/default.nix
··· 53 53 "-Dversion=${version}" 54 54 ]; 55 55 56 - NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ 56 + NIX_CFLAGS_COMPILE = [ 57 + # Needed with GCC 12 58 + "-Wno-error=address" 59 + ] ++ lib.optionals stdenv.isDarwin [ 57 60 "-Wno-sometimes-uninitialized" 58 61 "-Wno-tautological-pointer-compare" 59 62 ] ++ lib.optionals stdenv.isLinux [ 60 63 "-Wno-array-bounds" 61 64 "-Wno-free-nonheap-object" 62 65 "-Wno-stringop-truncation" 63 - ]); 66 + ]; 64 67 65 68 passthru = { 66 69 updateScript = nix-update-script { };
+5 -1
pkgs/tools/filesystems/blobfuse/default.nix
··· 24 24 pname = "blobfuse"; 25 25 inherit version src; 26 26 27 - NIX_CFLAGS_COMPILE = "-Wno-error=catch-value"; 27 + NIX_CFLAGS_COMPILE = [ 28 + # Needed with GCC 12 29 + "-Wno-error=deprecated-declarations" 30 + "-Wno-error=catch-value" 31 + ]; 28 32 29 33 buildInputs = [ curl gnutls libgcrypt libuuid fuse boost cpplite ]; 30 34 nativeBuildInputs = [ cmake pkg-config ];
+5
pkgs/tools/filesystems/idsk/default.nix
··· 14 14 15 15 nativeBuildInputs = [ cmake ]; 16 16 17 + NIX_CFLAGS_COMPILE = [ 18 + # Needed with GCC 12 19 + "-std=c++14" 20 + ]; 21 + 17 22 installPhase = '' 18 23 mkdir -p $out/bin 19 24 cp iDSK $out/bin
+5
pkgs/tools/misc/lockfile-progs/default.nix
··· 11 11 12 12 buildInputs = [ liblockfile ]; 13 13 14 + NIX_CFLAGS_COMPILE = [ 15 + # Needed with GCC 12 16 + "-Wno-error=format-overflow" 17 + ]; 18 + 14 19 installPhase = '' 15 20 runHook preInstall 16 21 mkdir -p $out/bin $out/man/man1
+5
pkgs/tools/misc/wimboot/default.nix
··· 16 16 buildInputs = [ libbfd zlib libiberty ]; 17 17 makeFlags = [ "wimboot.x86_64.efi" ]; 18 18 19 + NIX_CFLAGS_COMPILE = [ 20 + # Needed with GCC 12 21 + "-Wno-error=array-bounds" 22 + ]; 23 + 19 24 installPhase = '' 20 25 mkdir -p $out/share/wimboot/ 21 26 cp wimboot.x86_64.efi $out/share/wimboot
+5
pkgs/tools/networking/tgt/default.nix
··· 22 22 "SD_NOTIFY=1" 23 23 ]; 24 24 25 + NIX_CFLAGS_COMPILE = [ 26 + # Needed with GCC 12 27 + "-Wno-error=maybe-uninitialized" 28 + ]; 29 + 25 30 installFlags = [ 26 31 "sysconfdir=${placeholder "out"}/etc" 27 32 ];
+5
pkgs/tools/networking/uqmi/default.nix
··· 18 18 nativeBuildInputs = [ cmake perl ]; 19 19 buildInputs = [ libubox json_c ]; 20 20 21 + NIX_CFLAGS_COMPILE = [ 22 + # Needed with GCC 12 23 + "-Wno-error=dangling-pointer" 24 + ]; 25 + 21 26 meta = with lib; { 22 27 description = "Tiny QMI command line utility"; 23 28 homepage = "https://git.openwrt.org/?p=project/uqmi.git;a=summary";
+5
pkgs/tools/security/aflplusplus/default.nix
··· 51 51 --replace '"clang++"' '"clang++-UNSUPPORTED"' 52 52 ''; 53 53 54 + NIX_CFLAGS_COMPILE = [ 55 + # Needed with GCC 12 56 + "-Wno-error=use-after-free" 57 + ]; 58 + 54 59 makeFlags = [ "PREFIX=$(out)" ]; 55 60 buildPhase = '' 56 61 common="$makeFlags -j$NIX_BUILD_CORES"
+5
pkgs/tools/security/chipsec/default.nix
··· 40 40 mkdir -p $CHIPSEC_BUILD_LIB/chipsec/helper/linux 41 41 ''; 42 42 43 + NIX_CFLAGS_COMPILE = [ 44 + # Needed with GCC 12 45 + "-Wno-error=dangling-pointer" 46 + ]; 47 + 43 48 preInstall = lib.optionalString withDriver '' 44 49 mkdir -p $out/${python3.pkgs.python.sitePackages}/drivers/linux 45 50 mv $CHIPSEC_BUILD_LIB/chipsec/helper/linux/chipsec.ko \
+5 -1
pkgs/tools/system/acpica-tools/default.nix
··· 29 29 "iasl" 30 30 ]; 31 31 32 - NIX_CFLAGS_COMPILE = "-O3"; 32 + NIX_CFLAGS_COMPILE = [ 33 + "-O3" 34 + # Needed with GCC 12 35 + "-Wno-dangling-pointer" 36 + ]; 33 37 34 38 enableParallelBuilding = true; 35 39
+5
pkgs/tools/text/qgrep/default.nix
··· 21 21 22 22 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices CoreFoundation ]; 23 23 24 + NIX_CFLAGS_COMPILE = [ 25 + # Needed with GCC 12 26 + "-Wno-error=mismatched-new-delete" 27 + ]; 28 + 24 29 postPatch = lib.optionalString stdenv.isAarch64 '' 25 30 substituteInPlace Makefile \ 26 31 --replace "-msse2" "" --replace "-DUSE_SSE2" ""
+5 -2
pkgs/top-level/all-packages.nix
··· 14258 14258 num = 14259 14259 if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6 14260 14260 else if (stdenv.targetPlatform.isAarch64 && stdenv.isLinux) then 9 14261 - else 11; 14261 + else 12; 14262 14262 numS = toString num; 14263 14263 in { 14264 14264 gcc = pkgs.${"gcc${numS}"}; ··· 23561 23561 23562 23562 vte = callPackage ../development/libraries/vte { 23563 23563 # Needs GCC ≥10 but aarch64 defaults to GCC 9. 23564 - stdenv = clangStdenv; 23564 + stdenv = 23565 + if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU 23566 + then clangStdenv 23567 + else stdenv; 23565 23568 }; 23566 23569 23567 23570 vte-gtk4 = vte.override {