about summary refs log tree commit diff
path: root/pkgs/applications/emulators/zsnes
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-11-06 23:57:58 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-11-06 23:57:58 +0000
commiteccb0a9b8037bf3941729cddfda96a4817bf1ff8 (patch)
treeff006b8abf85cc15a8d085b7c2fcc7af10881f78 /pkgs/applications/emulators/zsnes
parent99801a56d71df2a7d295fbdb3693f471885a5922 (diff)
zsnes: pin to c++14 to fix build with gcc-11
Without the change build on `master` fails as:

    jma/jma.h:67:28: error: ISO C++17 does not allow dynamic exception specifications
       67 |     jma_open(const char *) throw(jma_errors);
          |                            ^~~~~

ZHF: https://github.com/NixOS/nixpkgs/issues/199919
Diffstat (limited to 'pkgs/applications/emulators/zsnes')
-rw-r--r--pkgs/applications/emulators/zsnes/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/applications/emulators/zsnes/default.nix b/pkgs/applications/emulators/zsnes/default.nix
index 956604cd6cc62..b9dd0f77a4ff4 100644
--- a/pkgs/applications/emulators/zsnes/default.nix
+++ b/pkgs/applications/emulators/zsnes/default.nix
@@ -34,7 +34,8 @@ in stdenv.mkDerivation {
 
   # Workaround build failure on -fno-common toolchains:
   #   ld: initc.o:(.bss+0x28): multiple definition of `HacksDisable'; cfg.o:(.bss+0x59e3): first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  # Use pre-c++17 standard (c++17 forbids throw annotations)
+  NIX_CFLAGS_COMPILE = "-fcommon -std=c++14";
 
   preConfigure = ''
     cd src