diff --git a/srcpkgs/icecat/template b/srcpkgs/icecat/template index 88aaefa1b64..9840868de43 100644 --- a/srcpkgs/icecat/template +++ b/srcpkgs/icecat/template @@ -30,6 +30,15 @@ CFLAGS+="\ -I${XBPS_CROSS_BASE}/usr/include/nss" CXXFLAGS="${CFLAGS}" +_gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }') +if [ "${_gccver%%.*}" -gt 5 ]; then + # Append CFLAGS and CXXFLAGS to set work around code which gcc6 would + # otherwise regard as out-of-specification and allow it to produce a + # working program. + CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" + CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" +fi + pre_configure() { case "$XBPS_TARGET_MACHINE" in *-musl)