From: Jan Palus Date: Thu, 11 Jan 2018 15:43:00 +0000 (+0100) Subject: bring clang support from firefox X-Git-Tag: auto/th/firefox52-esr-52.5.3-1~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Ffirefox52-esr.git;a=commitdiff_plain;h=3a4708d bring clang support from firefox gcc7 build crashes deterministically on some web pages (finding working configuration with gcc7 should become new olympic sport) --- diff --git a/firefox52-esr.spec b/firefox52-esr.spec index 13b9aaf..8d54e5b 100644 --- a/firefox52-esr.spec +++ b/firefox52-esr.spec @@ -10,6 +10,7 @@ # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964 %bcond_with shared_js # shared libmozjs library [broken] %bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2) +%bcond_without clang # build using Clang/LLVM # On updating version, grab CVE links from: # https://www.mozilla.org/security/known-vulnerabilities/firefox.html @@ -55,10 +56,11 @@ BuildRequires: automake BuildRequires: autoconf2_13 BuildRequires: bzip2-devel BuildRequires: cairo-devel >= 1.10.2-5 +%{?with_clang:BuildRequires: clang} BuildRequires: dbus-glib-devel >= 0.60 BuildRequires: fontconfig-devel >= 1:2.7.0 BuildRequires: freetype-devel >= 1:2.1.8 -BuildRequires: gcc-c++ >= 6:4.4 +%{!?with_clang:BuildRequires: gcc-c++ >= 6:4.4} BuildRequires: glib2-devel >= 1:2.22 BuildRequires: gstreamer-devel >= 1.0 BuildRequires: gstreamer-plugins-base-devel >= 1.0 @@ -233,6 +235,14 @@ cp -p %{_datadir}/automake/config.* build/autoconf cat << 'EOF' > .mozconfig . $topsrcdir/browser/config/mozconfig +%if %{with clang} +export CC="clang" +export CXX="clang++" +%else +export CC="%{__cc}" +export CXX="%{__cxx}" +%endif + mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} # Options for 'configure' (same as command-line options).