firefox-esr: fix gcc6 build
Cherry picked patches from the openembedded mailing list: http://lists.openembedded.org/pipermail/openembedded-devel/2016-July/108029.html Also see #4748
This commit is contained in:
parent
ff2687315c
commit
1c55f26a44
2 changed files with 27 additions and 1 deletions
15
srcpkgs/firefox-esr/patches/fix-gcc6-cpluplus_scope.patch
Normal file
15
srcpkgs/firefox-esr/patches/fix-gcc6-cpluplus_scope.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Add patch to to correct the source to be compatible with gcc6 by
|
||||
preventing c++ scope errors.
|
||||
|
||||
--- nsprpub/config/make-system-wrappers.pl 2016-05-12 19:10:05.000000000 +0200
|
||||
+++ nsprpub/config/make-system-wrappers.pl 2016-09-17 15:03:53.901400739 +0200
|
||||
@@ -19,7 +19,9 @@
|
||||
open OUT, ">$output_dir/$_";
|
||||
print OUT "#pragma GCC system_header\n"; # suppress include_next warning
|
||||
print OUT "#pragma GCC visibility push(default)\n";
|
||||
+ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
|
||||
print OUT "#include_next \<$_\>\n";
|
||||
+ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
|
||||
print OUT "#pragma GCC visibility pop\n";
|
||||
close OUT;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Template build file for 'firefox-esr'.
|
||||
pkgname=firefox-esr
|
||||
version=45.3.0
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="firefox-${version}esr"
|
||||
short_desc="Lightweight gecko-based web browser"
|
||||
maintainer="Eivind Uggedal <eivind@uggedal.com>"
|
||||
|
@ -27,6 +27,17 @@ makedepends="
|
|||
depends="nss>=3.21 desktop-file-utils hicolor-icon-theme"
|
||||
conflicts="firefox>=0"
|
||||
|
||||
CXXFLAGS="-std=c++11"
|
||||
|
||||
_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)
|
||||
|
|
Loading…
Reference in a new issue