grafx2: add -fcommon workaround

Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: ../obj/unix/tiles.o:/build/grafx2/src/global.h:306: multiple definition of
      `Main_selector'; ../obj/unix/main.o:/build/grafx2/src/global.h:306: first defined here
This commit is contained in:
Sergei Trofimovich 2022-05-14 17:55:30 +01:00
parent 197681059f
commit 85b0aa8d4d

View File

@ -15,6 +15,12 @@ stdenv.mkDerivation rec {
preBuild = "cd src";
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: ../obj/unix/tiles.o:/build/grafx2/src/global.h:306: multiple definition of
# `Main_selector'; ../obj/unix/main.o:/build/grafx2/src/global.h:306: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
preInstall = '' mkdir -p "$out" '';
installPhase = ''make install prefix="$out"'';