Merge pull request #173725 from trofi/workaround-fno-common-for-dspam

dspam: add -fcommon workaround
This commit is contained in:
Sergei Trofimovich 2022-05-29 16:01:04 +00:00 committed by GitHub
commit 5580257e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,12 @@ in stdenv.mkDerivation rec {
] ++ lib.optional withMySQL "--with-mysql-includes=${mysql57.connector-c}/include/mysql"
++ lib.optional withPgSQL "--with-pgsql-libraries=${postgresql.lib}/lib";
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: .libs/hash_drv.o:/build/dspam-3.10.2/src/util.h:96: multiple definition of `verified_user';
# .libs/libdspam.o:/build/dspam-3.10.2/src/util.h:96: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
# Lots of things are hardwired to paths like sysconfdir. That's why we install with both "prefix" and "DESTDIR"
# and fix directory structure manually after that.
installFlags = [ "DESTDIR=$(out)" ];