]> git.pld-linux.org Git - packages/firefox52-esr.git/commitdiff
bring clang support from firefox
authorJan Palus <atler@pld-linux.org>
Thu, 11 Jan 2018 15:43:00 +0000 (16:43 +0100)
committerJan Palus <atler@pld-linux.org>
Thu, 11 Jan 2018 15:55:57 +0000 (16:55 +0100)
gcc7 build crashes deterministically on some web pages (finding working
configuration with gcc7 should become new olympic sport)

firefox52-esr.spec

index 13b9aaf7ac936e602884696edcddad8e5fd1ca55..8d54e5b579497ef13c9fc07d6bb0a1f75f1acf1e 100644 (file)
@@ -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)
 # - 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
 
 # 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
 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: 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
 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
 
 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).
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
 
 # Options for 'configure' (same as command-line options).
This page took 0.097026 seconds and 4 git commands to generate.