From 06a8f20762dacbefb6a38b3d379c133d3167c2de Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 2 Jun 2022 23:29:05 +0100 Subject: [PATCH] ufoai: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: r_gl.h:52: multiple definition of `qglGenBuffers'; r_gl.h:52: first defined here --- pkgs/games/ufoai/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/games/ufoai/default.nix b/pkgs/games/ufoai/default.nix index 1dc2abbf7624..f596ac2756b6 100644 --- a/pkgs/games/ufoai/default.nix +++ b/pkgs/games/ufoai/default.nix @@ -14,6 +14,13 @@ stdenv.mkDerivation rec { sha256 = "1drhh08cqqkwv1yz3z4ngkplr23pqqrdx6cp8c3isy320gy25cvb"; }; + # Workaround build failure on -fno-common toolchains: + # ld: r_gl.h:52: multiple definition of `qglGenBuffers'; + # r_gl.h:52: first defined here + # TODO: drop once release contains upstream fix: + # https://github.com/ufoai/ufoai/commit/8a3075fffdad294e + NIX_CFLAGS_COMPILE = "-fcommon"; + preConfigure = ''tar xvf "${srcData}"''; configureFlags = [ "--enable-release" "--enable-sse" ]