cernlib: add -fcommon workaround

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

    ld: libpacklib.a(kedit.o):kuip/klink1.h:11: multiple definition of `klnkaddr';
      libzftplib.a(zftpcdf.o):zftp/zftpcdf.c:155: first defined here
This commit is contained in:
Sergei Trofimovich 2022-06-05 18:33:15 +01:00
parent 88e0f07bd6
commit 46e4f3bd77

View file

@ -53,6 +53,11 @@ stdenv.mkDerivation rec {
NIX_CFLAGS = [ "-Wno-return-type" ];
# Workaround build failure on -fno-common toolchains:
# ld: libpacklib.a(kedit.o):kuip/klink1.h:11: multiple definition of `klnkaddr';
# libzftplib.a(zftpcdf.o):zftp/zftpcdf.c:155: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [
"FORTRANOPTIONS=$(FFLAGS)"
"CCOPTIONS=$(NIX_CFLAGS)"