This should prevent older gcc versions from choking on unknown argument.
I have not tested this, just wrote the code directly on github. Use with caution.
extracflags=
[ "${MACHINE_GNU_ARCH}" = "x86_64" ] \
- && extracflags='-F CFLAGS=-mno-red-zone -F CPPFLAGS=-Wimplicit-fallthrough=0'
+ && extracflags='-F CFLAGS=-mno-red-zone'
+
+
+ # Disable new errors on GCC 7 which break netbsd-src compilation
+ #
+ [ `gcc -dumpversion | cut -f1 -d.` -ge 7 ] \
+ && extracflags="$extracflags -F CPPFLAGS=-Wimplicit-fallthrough=0"
+
# build tools
${BUILDRUMP}/buildrump.sh ${BUILD_QUIET} ${STDJ} -k \