Adjust build flags + disable debug package for 32 bit builds (not enough memory)

This commit is contained in:
Andrey Bondrov 2020-07-08 16:18:39 +10:00
parent 43db71b63f
commit 07db421409

View file

@ -1,3 +1,8 @@
%ifarch %{ix86}
%define debug_package %{nil}
%endif
%bcond_with clang
%bcond_with syshunspell
%define oname Pale-Moon
@ -9,8 +14,6 @@
%define mozillalibdir %{_libdir}/%{name}-%{version}
%define pluginsdir %{_libdir}/mozilla/plugins
%bcond_with clang
Summary: Web browser based on Goanna engine
Name: newmoon
Version: 28.10.0
@ -141,14 +144,18 @@ popd
autoconf-2.13
%build
%ifarch %{ix86}
%global optflags %(echo %{optflags} | sed -e 's/-gdwarf-4//' -e 's/-Wa,--compress-debug-sections//')
%enfif
%if %{with clang}
export CC=clang
export CXX=clang++
export LINKER=ld.lld
export CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-defaulted-function-deleted -Wno-enum-compare-switch -Wno-unused-private-field -Wno-unreachable-code -Wno-sign-compare"
export CXXFLAGS="$CFLAGS -fpermissive"
%global optflags %(echo %{optflags} | sed -e 's/-fvar-tracking-assignments//' -e 's/-frecord-gcc-switches//')
%else
%global optflags %(echo %{optflags} | sed -e 's/-gdwarf-4//' -e 's/-fvar-tracking-assignments//' -e 's/-frecord-gcc-switches//' -e 's/-Wa,--compress-debug-sections//')
%setup_compile_flags
CFLAGS=$(echo %{optflags} | sed -e 's/-fexceptions//')
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-ignored-optimization-argument"