mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
treewide: another round of gcc12 fixups
This commit is contained in:
parent
39c285eb4f
commit
555f300879
@ -66,6 +66,10 @@ stdenv.mkDerivation rec {
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <memory>' -i Source/TitleBar.h # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
cmakeBuildType = "Release";
|
cmakeBuildType = "Release";
|
||||||
|
|
||||||
cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ];
|
cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ];
|
||||||
|
@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <utility>' -i \
|
||||||
|
lib/JUCE/modules/juce_gui_basics/windows/juce_ComponentPeer.h # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -80,6 +80,11 @@ stdenv.mkDerivation rec {
|
|||||||
# guile warning
|
# guile warning
|
||||||
GUILE_AUTO_COMPILE="0";
|
GUILE_AUTO_COMPILE="0";
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||||
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
||||||
|
"-Wno-error=use-after-free"
|
||||||
|
];
|
||||||
|
|
||||||
# `make check` target does not define its prerequisites but expects them to
|
# `make check` target does not define its prerequisites but expects them to
|
||||||
# have already been built. The list of targets below was built through trial
|
# have already been built. The list of targets below was built through trial
|
||||||
# and error based on failing tests.
|
# and error based on failing tests.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, corrosion
|
, corrosion
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
, gcc11
|
, gcc12
|
||||||
, kconfig
|
, kconfig
|
||||||
, kcoreaddons
|
, kcoreaddons
|
||||||
, kdbusaddons
|
, kdbusaddons
|
||||||
@ -45,7 +45,7 @@ mkDerivation rec {
|
|||||||
cmake
|
cmake
|
||||||
corrosion
|
corrosion
|
||||||
extra-cmake-modules
|
extra-cmake-modules
|
||||||
gcc11 # doesn't build with GCC 9 from stdenv on aarch64
|
gcc12 # doesn't build with GCC 9 from stdenv on aarch64
|
||||||
] ++ (with rustPlatform; [
|
] ++ (with rustPlatform; [
|
||||||
cargoSetupHook
|
cargoSetupHook
|
||||||
rust.cargo
|
rust.cargo
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, mkDerivation
|
, mkDerivation
|
||||||
|
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
, gcc11
|
, gcc12
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
|
||||||
, gst_all_1
|
, gst_all_1
|
||||||
@ -22,7 +22,7 @@ mkDerivation rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
extra-cmake-modules
|
extra-cmake-modules
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
gcc11 # doesn't build with GCC 9 from stdenv on aarch64
|
gcc12 # doesn't build with GCC 9 from stdenv on aarch64
|
||||||
python3Packages.wrapPython
|
python3Packages.wrapPython
|
||||||
python3Packages.pybind11
|
python3Packages.pybind11
|
||||||
];
|
];
|
||||||
|
@ -60,8 +60,8 @@ stdenv.mkDerivation rec {
|
|||||||
--prefix PATH : "$out/share/cbmc" \
|
--prefix PATH : "$out/share/cbmc" \
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
|
||||||
# Needed with GCC 12
|
# Needed with GCC 12 but breaks on darwin (with clang)
|
||||||
"-Wno-error=maybe-uninitialized"
|
"-Wno-error=maybe-uninitialized"
|
||||||
] ++ lib.optionals stdenv.cc.isClang [
|
] ++ lib.optionals stdenv.cc.isClang [
|
||||||
# fix "argument unused during compilation"
|
# fix "argument unused during compilation"
|
||||||
|
@ -99,6 +99,8 @@ stdenv.mkDerivation rec {
|
|||||||
cp -r ${expected-wrap} ${expected-wrap.name}
|
cp -r ${expected-wrap} ${expected-wrap.name}
|
||||||
cp -r ${wlroots-wrap} ${wlroots-wrap.name}
|
cp -r ${wlroots-wrap} ${wlroots-wrap.name}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
sed '1i#include <functional>' -i cardboard/ViewAnimation.h # gcc12
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# "Inherited" from Nixpkgs expression for wlroots
|
# "Inherited" from Nixpkgs expression for wlroots
|
||||||
@ -108,6 +110,8 @@ stdenv.mkDerivation rec {
|
|||||||
"-Dwlroots:libseat=disabled"
|
"-Dwlroots:libseat=disabled"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ]; # gcc12
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://gitlab.com/cardboardwm/cardboard";
|
homepage = "https://gitlab.com/cardboardwm/cardboard";
|
||||||
description = "A scrollable, tiling Wayland compositor inspired on PaperWM";
|
description = "A scrollable, tiling Wayland compositor inspired on PaperWM";
|
||||||
|
@ -30,6 +30,8 @@ mkDerivation rec {
|
|||||||
|
|
||||||
# Change default optional terminal program path to one that is more likely to work on NixOS.
|
# Change default optional terminal program path to one that is more likely to work on NixOS.
|
||||||
substituteInPlace ./src/Configuration.cpp --replace "/usr/bin/xterm" "xterm";
|
substituteInPlace ./src/Configuration.cpp --replace "/usr/bin/xterm" "xterm";
|
||||||
|
|
||||||
|
sed '1i#include <memory>' -i include/{RegisterViewModelBase,State,IState}.h # gcc12
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -63,6 +63,10 @@ mkDerivation rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -18,6 +18,10 @@ stdenv.mkDerivation rec {
|
|||||||
./0001-fix-build-with-ffmpeg-4.patch
|
./0001-fix-build-with-ffmpeg-4.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <ctime>' -i src/arch/ArchHooks/ArchHooks.h # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake nasm ];
|
nativeBuildInputs = [ cmake nasm ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -29,6 +29,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1xkr3ka2sxp5s0spp84iv294i29s1vxqzazb6kmjc0n415h0x57p";
|
sha256 = "1xkr3ka2sxp5s0spp84iv294i29s1vxqzazb6kmjc0n415h0x57p";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <memory>' -i external/partio_zip/zip_manager.hpp # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config cmake ];
|
nativeBuildInputs = [ pkg-config cmake ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -42,6 +42,11 @@ let
|
|||||||
python3
|
python3
|
||||||
];
|
];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||||
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
||||||
|
"-Wno-error=maybe-uninitialized"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/ClusterLabs/resource-agents";
|
homepage = "https://github.com/ClusterLabs/resource-agents";
|
||||||
description = "Combined repository of OCF agents from the RHCS and Linux-HA projects";
|
description = "Combined repository of OCF agents from the RHCS and Linux-HA projects";
|
||||||
|
@ -13,6 +13,10 @@ mkDerivation rec {
|
|||||||
sha256 = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg=";
|
sha256 = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <array>' -i src/device.h # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [ qtbase qtgraphicaleffects ];
|
buildInputs = [ qtbase qtgraphicaleffects ];
|
||||||
nativeBuildInputs = [ wrapQtAppsHook cmake pkg-config ];
|
nativeBuildInputs = [ wrapQtAppsHook cmake pkg-config ];
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
|||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace ./config.h --replace \
|
substituteInPlace ./config.h --replace \
|
||||||
"#include \"ascii/gnu.h\"" "#include \"ascii/nixos.h\""
|
"#include \"ascii/gnu.h\"" "#include \"ascii/nixos.h\""
|
||||||
|
|
||||||
|
sed '1i#include <array>' -i config.h # gcc12
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Fixes installation path
|
# Fixes installation path
|
||||||
|
@ -14,6 +14,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1pl8ayadxb0zzh5s26yschkjhr1xffbzzv347m88f9y0jv34d24r";
|
sha256 = "1pl8ayadxb0zzh5s26yschkjhr1xffbzzv347m88f9y0jv34d24r";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <array>' -i src/dynports/dynports.cc # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson ninja pkg-config asciidoc libxslt.bin docbook_xml_dtd_45 docbook_xsl
|
meson ninja pkg-config asciidoc libxslt.bin docbook_xml_dtd_45 docbook_xsl
|
||||||
libxml2.bin docbook5 python3Packages.pytest python3Packages.pytest-timeout
|
libxml2.bin docbook5 python3Packages.pytest python3Packages.pytest-timeout
|
||||||
|
@ -18,8 +18,8 @@ stdenv.mkDerivation {
|
|||||||
nativeBuildInputs = [ cmake perl ];
|
nativeBuildInputs = [ cmake perl ];
|
||||||
buildInputs = [ libubox json_c ];
|
buildInputs = [ libubox json_c ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||||
# Needed with GCC 12
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
||||||
"-Wno-error=dangling-pointer"
|
"-Wno-error=dangling-pointer"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "sha256-406OhJt2Ila/LIhfqJXhbFqFxJJiRyMVI4/VK8Y43kc=";
|
sha256 = "sha256-406OhJt2Ila/LIhfqJXhbFqFxJJiRyMVI4/VK8Y43kc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed '1i#include <algorithm>' -i src/stringHelper.h # gcc12
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices CoreFoundation ];
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices CoreFoundation ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||||
# Needed with GCC 12
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
||||||
"-Wno-error=mismatched-new-delete"
|
"-Wno-error=mismatched-new-delete"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -2532,7 +2532,7 @@ with pkgs;
|
|||||||
|
|
||||||
writefreely = callPackage ../applications/misc/writefreely { };
|
writefreely = callPackage ../applications/misc/writefreely { };
|
||||||
|
|
||||||
iqueue = callPackage ../development/libraries/iqueue { stdenv = gcc10StdenvCompat; };
|
iqueue = callPackage ../development/libraries/iqueue { };
|
||||||
|
|
||||||
lifecycled = callPackage ../tools/misc/lifecycled { };
|
lifecycled = callPackage ../tools/misc/lifecycled { };
|
||||||
|
|
||||||
@ -15237,7 +15237,7 @@ with pkgs;
|
|||||||
mitama-cpp-result = callPackage ../development/libraries/mitama-cpp-result { };
|
mitama-cpp-result = callPackage ../development/libraries/mitama-cpp-result { };
|
||||||
|
|
||||||
mitscheme = callPackage ../development/compilers/mit-scheme
|
mitscheme = callPackage ../development/compilers/mit-scheme
|
||||||
{ stdenv = gcc10StdenvCompat; texLive = texlive.combine { inherit (texlive) scheme-small epsf texinfo; }; };
|
{ texLive = texlive.combine { inherit (texlive) scheme-small epsf texinfo; }; };
|
||||||
|
|
||||||
mitschemeX11 = mitscheme.override {
|
mitschemeX11 = mitscheme.override {
|
||||||
enableX11 = true;
|
enableX11 = true;
|
||||||
@ -17497,6 +17497,7 @@ with pkgs;
|
|||||||
|
|
||||||
libgcc = callPackage ../development/libraries/gcc/libgcc {
|
libgcc = callPackage ../development/libraries/gcc/libgcc {
|
||||||
stdenvNoLibs = gccStdenvNoLibs; # cannot be built with clang it seems
|
stdenvNoLibs = gccStdenvNoLibs; # cannot be built with clang it seems
|
||||||
|
gcc = gcc11; # fails to build with gcc12
|
||||||
};
|
};
|
||||||
|
|
||||||
# This is for e.g. LLVM libraries on linux.
|
# This is for e.g. LLVM libraries on linux.
|
||||||
|
Loading…
Reference in New Issue
Block a user