]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Make the disabling of the fallthrough warning dependent on GCC version
authorNaja Melan <najamelan@autistici.org>
Thu, 4 Jan 2018 16:07:46 +0000 (16:07 +0000)
committerGitHub <noreply@github.com>
Thu, 4 Jan 2018 16:07:46 +0000 (16:07 +0000)
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.

build-rr.sh

index 7ea2acc8654383d1374007a0a3f033b49f3e1af4..82e831ba127848a301a47772dfd236672045d40d 100755 (executable)
@@ -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             \