On 2023 Feb 25 (Sat) at 16:11:52 +0100 (+0100), Theo Buehler wrote:
:>
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.
:
with this patch, on arm64 I can build riscv-elf-gcc and that can build
riscv-elf-newlib.
OK
: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
--
One can't proceed from the informal to the formal by formal means.