Fixing pcc 1.0.0 for -fno-common is a bit hairy. It is relatively easy
to update the port itself to 1.1.0 (and it requires two obvious patches
for -fno-common), but the resulting pcc binary seems useless without
pcc-libs. Porting those seems to require more effort than I want to
invest.  Thus, I suggest to add -fcommon and leave a comment in hopes
that the person updating to 1.1.0 will care enough about it to remove
-fcommon.

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/pcc/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile    31 Aug 2020 22:20:49 -0000      1.21
+++ Makefile    4 Feb 2021 13:55:15 -0000
@@ -4,7 +4,7 @@ COMMENT =       portable C compiler
 
 PCCVER =       1.0.0
 DISTNAME =     pcc-${PCCVER}
-REVISION =     17
+REVISION =     18
 EXTRACT_SUFX = .tgz
 
 CATEGORIES =   lang
@@ -18,6 +18,9 @@ ONLY_FOR_ARCHS = i386 amd64
 PERMIT_PACKAGE =       Yes
 
 WANTLIB += c
+
+# pcc 1.1.0 is easily fixed for -fno-common, but requires porting pcc-libs
+CFLAGS += -fcommon
 
 MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \
                ftp://pcc.ludd.ltu.se/pub/pcc-releases/

Reply via email to