That's what FreeBSD did also:
https://github.com/freebsd/freebsd-ports/commit/4cab0ea0d675f223f701cdff709d2e65851aa657

The port has more than 50 global symbols defined in more than half a
dozen headers, so let upstream deal with this.

Unsure where to add -fcommon. I saw patches adding it to COPTS, others
added it to CFLAGS or CPPFLAGS. What is preferred?

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/dieharder/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    12 Jul 2019 20:47:40 -0000      1.4
+++ Makefile    2 Feb 2021 15:20:20 -0000
@@ -3,7 +3,7 @@
 COMMENT =              random number generator (rng) testing suite
 
 DISTNAME =             dieharder-3.31.1
-REVISION =             1
+REVISION =             2
 SHARED_LIBS +=  dieharder                 0.0 # 0.0
 CATEGORIES =           math
 
@@ -21,6 +21,8 @@ WANTLIB += c gsl gslcblas m
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ENV +=       CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib"
+
+CFLAGS +=              -fcommon
 
 BUILD_DEPENDS =                textproc/latex2html
 LIB_DEPENDS =          devel/gsl

Reply via email to