workaround build issues on s390

If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which
overrides the -g1 from line above and breaks building on s390
(OOM when linking, rhbz#1238225)

Workaround mis-optimization in javascipt engine on s390 (rhbz#1219542)
This commit is contained in:
Dan Horák 2015-07-08 12:08:50 -04:00
parent 22ebc347ff
commit 984e2ab973
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,23 @@
diff -up mozilla-release/js/src/configure.in.opt mozilla-release/js/src/configure.in
--- mozilla-release/js/src/configure.in.opt 2015-05-04 02:43:23.000000000 +0200
+++ mozilla-release/js/src/configure.in 2015-05-07 14:21:07.685405039 +0200
@@ -1492,7 +1492,7 @@ case "$host" in
*-linux*|*-kfreebsd*-gnu|*-gnu*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}"
;;
*)
@@ -1674,8 +1674,8 @@ ia64*-hpux*)
# while; Intel recommends against using it.
MOZ_OPTIMIZE_FLAGS="-O2"
elif test "$GNU_CC" -o "$GNU_CXX"; then
- MOZ_PGO_OPTIMIZE_FLAGS="-O3"
- MOZ_OPTIMIZE_FLAGS="-O3"
+ MOZ_PGO_OPTIMIZE_FLAGS="-O1"
+ MOZ_OPTIMIZE_FLAGS="-O1"
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi

View File

@ -80,6 +80,7 @@ Patch9: mozilla-build-arm.patch
Patch100: thunderbird-objdir.patch
Patch101: build-nspr-prbool.patch
Patch102: build-werror.patch
Patch103: rhbz-1219542-s390-build.patch
# Linux specific
Patch200: thunderbird-enable-addons.patch
@ -181,6 +182,9 @@ cd mozilla
%patch300 -p2 -b .852698
%patch102 -p2 -b .build-werror
%patch101 -p1 -b .nspr-prbool
%ifarch s390
%patch103 -p1 -b .rhbz-1219542-s390-build
%endif
%patch400 -p1 -b .966424
%patch402 -p1 -b .rhbz-1014858
@ -297,6 +301,10 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
%endif
%ifarch s390
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/')
# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which
# overrides the -g1 from line above and breaks building on s390
# (OOM when linking, rhbz#1238225)
export MOZ_DEBUG_FLAGS=" "
%endif
%ifarch s390 %{arm} ppc aarch64 i686
MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"