[packages/firefox52-esr] bring clang support from firefox

atler atler at pld-linux.org
Thu Jan 11 16:58:19 CET 2018


commit 3a4708da5f7d6490eef6c7a47ed5b5bcf10ce548
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Jan 11 16:43:00 2018 +0100

    bring clang support from firefox
    
    gcc7 build crashes deterministically on some web pages (finding working
    configuration with gcc7 should become new olympic sport)

 firefox52-esr.spec | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
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).
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/firefox52-esr.git/commitdiff/3a4708da5f7d6490eef6c7a47ed5b5bcf10ce548



More information about the pld-cvs-commit mailing list