From 62d5b64dcafea5109e79725f49fcb0100dd16b02 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Sat, 17 Sep 2016 17:32:45 +0200 Subject: [PATCH] firefox: fix gcc6 build --- srcpkgs/firefox/template | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index 76578da1804..674550b06db 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -1,7 +1,7 @@ # Template build file for 'firefox'. pkgname=firefox version=48.0.2 -revision=2 +revision=3 short_desc="Lightweight gecko-based web browser" maintainer="Juan RP " homepage="https://www.mozilla.org/firefox/" @@ -34,6 +34,15 @@ case "$XBPS_TARGET_MACHINE" in x86_64*) build_options_default+=" rust" ;; esac +_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 + post_extract() { [ ! -d "${wrkdrc}/xbps-build" ] && mkdir -p "${wrksrc}/xbps-build" }