From 813520e62490be7e0657f70982274b4895837300 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 20:52:21 +0100 Subject: [PATCH] uae: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: bsdsocket.o:(.bss+0x0): multiple definition of `socketbases'; main.o:(.bss+0x2792c0): first defined here --- pkgs/applications/emulators/uae/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/emulators/uae/default.nix b/pkgs/applications/emulators/uae/default.nix index 64f311c4a8a6..aeceb0dc6f84 100644 --- a/pkgs/applications/emulators/uae/default.nix +++ b/pkgs/applications/emulators/uae/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2 alsa-lib SDL ]; hardeningDisable = [ "format" ]; + # Workaround build failure on -fno-common toolchains: + # ld: bsdsocket.o:(.bss+0x0): multiple definition of + # `socketbases'; main.o:(.bss+0x2792c0): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; LDFLAGS = [ "-lm" ]; meta = {