Skip to content

Commit a382cc2

Browse files
committed
toolchain: Fix builds with GCC 7.4.0 and 8.2.0
1 parent 94bdf32 commit a382cc2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

build-rr.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,18 @@ buildrump ()
355355

356356
# Disable new errors on GCC 7 which break netbsd-src compilation
357357
#
358-
[ `gcc -dumpversion | cut -f1 -d.` -ge 7 ] \
359-
&& extracflags="$extracflags -F CPPFLAGS=-Wimplicit-fallthrough=0"
358+
[ `${CC} -dumpversion | cut -f1 -d.` -ge 7 ] \
359+
&& extracflags="$extracflags -F CPPFLAGS=-Wimplicit-fallthrough=0" \
360+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=maybe-uninitialized" \
361+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=implicit-function-declaration"
360362

363+
# Disable new errors on GCC 8 which break netbsd-src compilation
364+
#
365+
[ `${CC} -dumpversion | cut -f1 -d.` -ge 8 ] \
366+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=packed-not-aligned" \
367+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=cast-function-type" \
368+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=tautological-compare" \
369+
&& extracflags="$extracflags -F CFLAGS=-Wno-error=attributes"
361370

362371
# build tools
363372
${BUILDRUMP}/buildrump.sh ${BUILD_QUIET} ${STDJ} -k \

0 commit comments

Comments
 (0)