diff --git a/srcpkgs/elfutils/template b/srcpkgs/elfutils/template index 1d920a95dea..54ebf0bc83c 100644 --- a/srcpkgs/elfutils/template +++ b/srcpkgs/elfutils/template @@ -15,6 +15,10 @@ checksum=3f300087c42b6f35591163b48246b4098ce39c4c6f5d55a83023c903c5776553 # Suppress certain warnings to not fail for -Werror CFLAGS="-Wno-unused-result -Wno-format-nonliteral" +_gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }') +if [ "${_gccver%%.*}" -gt 5 ]; then + CFLAGS+=" -Wno-null-dereference" +fi case "$XBPS_TARGET_MACHINE" in *-musl) makedepends+=" argp-standalone musl-fts-devel musl-obstack" ;;