Merge pull request #175431 from trofi/workaround-fno-common-for-typespeed

typespeed: add -fcommon workaround
This commit is contained in:
Sandro 2022-06-03 17:00:56 +02:00 committed by GitHub
commit 2204f77859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
patches = [ ./typespeed-config-in-home.patch ];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: typespeed-typespeed.o:/build/typespeed-0.6.5/src/typespeed.h:69: multiple definition of
# `opt'; typespeed-file.o:/build/typespeed-0.6.5/src/typespeed.h:69: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
configureFlags = [ "--datadir=\${out}/share/" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];