> http://build-failures.rhaalovely.net/aarch64/2023-02-22/devel/riscv-elf/gcc.log

This fails to build if lang/gcc/8 is installed because it picks up the
old ansidecl.h which misses a few #defines.

One option is to define the missing ones away. Defining them to the
right thing is harder since they are passed through several shells, so
getting the quoting right is tricky.

Hopefully someone else has a better idea.

Index: gcc/Makefile
===================================================================
RCS file: /cvs/ports/devel/riscv-elf/gcc/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- gcc/Makefile        19 Feb 2023 13:55:04 -0000      1.9
+++ gcc/Makefile        25 Feb 2023 15:00:30 -0000
@@ -3,7 +3,7 @@ COMMENT=        gcc for riscv-elf cross-develop
 VERSION=       12.2.0
 DISTNAME=      gcc-${VERSION}
 PKGNAME=       riscv-elf-gcc-${VERSION}
-REVISION=      0
+REVISION=      1
 
 SUBST_VARS+=   VERSION
 
@@ -37,8 +37,13 @@ CONFIGURE_ARGS+=--enable-languages=${LAN
                --enable-cpp                    \
                --without-isl                   \
                --without-zstd
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib"
+
+# Avoid build failure when lang/gcc/8 is installed whose ansidecl.h misses 
these
+CPPFLAGS +=    -DATTRIBUTE_NONSTRING= -DATTRIBUTE_RESULT_SIZE_1=
+CPPFLAGS +=    -DATTRIBUTE_RESULT_SIZE_2= -DATTRIBUTE_RESULT_SIZE_1_2=
+CPPFLAGS +=    -DATTRIBUTE_WARN_UNUSED_RESULT=
 
 SEPARATE_BUILD=        Yes
 USE_GMAKE=     Yes

Reply via email to