Merge pull request #175251 from trofi/workaround-fno-common-for-sil

sil: add -fcommon workaround
This commit is contained in:
Sergei Trofimovich 2022-05-31 09:22:11 +00:00 committed by GitHub
commit 7209d1f19a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,12 @@ stdenv.mkDerivation rec {
buildFlagsArray+=("LIBS=-lXaw -lXext -lSM -lICE -lXmu -lXt -lX11 -lncurses")
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: main.o:/build/source/Sil/src/externs.h:57: multiple definition of
# `mini_screenshot_char'; variable.o:/build/source/Sil/src/externs.h:57: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
installPhase = ''
# the makefile doesn't have a sensible install target, so we hav to do it ourselves
mkdir -p $out/bin