From: Naja Melan Date: Thu, 4 Jan 2018 16:07:46 +0000 (+0000) Subject: Make the disabling of the fallthrough warning dependent on GCC version X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=685f4ab3b74b6f1e1b40bdd3d2c42efa44bf385d;p=osstest%2Frumprun.git Make the disabling of the fallthrough warning dependent on GCC version 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. --- diff --git a/build-rr.sh b/build-rr.sh index 7ea2acc..82e831b 100755 --- a/build-rr.sh +++ b/build-rr.sh @@ -350,7 +350,14 @@ buildrump () 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 \