From 825fd5282edb022c9bf855f77c1c5188326b873ef8b078b52704d445419d1de8 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Wed, 25 May 2016 07:19:28 +0000 Subject: [PATCH] Accepting request 397789 from home:badshah400:branches:openSUSE:Factory:Rings:2-TestDVD Add patches to fix building against gcc >= 6 OBS-URL: https://build.opensuse.org/request/show/397789 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=318 --- MozillaThunderbird.changes | 10 ++++++++ MozillaThunderbird.spec | 9 +++++++ mozilla-flexible-array-member-in-union.patch | 22 ++++++++++++++++ mozilla-gcc6.patch | 27 ++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 mozilla-flexible-array-member-in-union.patch create mode 100644 mozilla-gcc6.patch diff --git a/MozillaThunderbird.changes b/MozillaThunderbird.changes index 9b794a7..529b306 100644 --- a/MozillaThunderbird.changes +++ b/MozillaThunderbird.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue May 24 18:28:31 UTC 2016 - badshah400@gmail.com + +- Add patches to fix building with gcc >= 6: + + mozilla-gcc6.patch: patch taken from fedora's git and is + essentially identical to upstream firefox patch: + https://hg.mozilla.org/mozilla-central/rev/55212130f19d. + + mozilla-flexible-array-member-in-union.patch: patch taken + from upstream bmo#1272649. + ------------------------------------------------------------------- Thu May 12 15:21:45 UTC 2016 - dimstar@opensuse.org diff --git a/MozillaThunderbird.spec b/MozillaThunderbird.spec index ff222af..444c43b 100644 --- a/MozillaThunderbird.spec +++ b/MozillaThunderbird.spec @@ -21,6 +21,8 @@ %define update_channel release %define releasedate 2016050700 +%define gcc_ver %(rpm -q --whatprovides --qf '%%{version}' gcc) + %if %suse_version > 1310 %define gstreamer_ver 1.0 %define gstreamer 1 @@ -103,6 +105,8 @@ Patch2: mozilla-nongnome-proxies.patch Patch3: mozilla-kde.patch Patch4: mozilla-develdirs.patch Patch5: mozilla-no-stdcxx-check.patch +Patch6: mozilla-gcc6.patch +Patch7: mozilla-flexible-array-member-in-union.patch # Thunderbird/mail Patch20: tb-ssldap.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -198,6 +202,11 @@ pushd mozilla %endif %patch4 -p1 %patch5 -p1 +# APPLY Patch6 and Patch7 ONLY IF GCC >= 6 IS USED FOR COMPILATION +%if %{gcc_ver} >= 6 +%patch6 -p1 +%patch7 -p1 +%endif popd # comm-central patches %patch20 -p1 diff --git a/mozilla-flexible-array-member-in-union.patch b/mozilla-flexible-array-member-in-union.patch new file mode 100644 index 0000000..066d845 --- /dev/null +++ b/mozilla-flexible-array-member-in-union.patch @@ -0,0 +1,22 @@ +--- firefox-45.0.1-orig/gfx/harfbuzz/src/hb-font-private.hh 2016-03-15 23:37:28.000000000 +0100 ++++ firefox-45.0.1/gfx/harfbuzz/src/hb-font-private.hh 2016-05-13 17:20:25.836258108 +0200 +@@ -80,7 +80,7 @@ struct hb_font_funcs_t { + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS + #undef HB_FONT_FUNC_IMPLEMENT + } f; +- void (*array[]) (void); ++ void (*array[VAR]) (void); + } get; + }; + +--- firefox-45.0.1-orig/gfx/harfbuzz/src/hb-private.hh 2016-03-15 23:37:28.000000000 +0100 ++++ firefox-45.0.1/gfx/harfbuzz/src/hb-private.hh 2016-05-13 17:20:55.909655179 +0200 +@@ -1010,5 +1010,7 @@ hb_options (void) + return _hb_options.opts; + } + ++/* Size signifying variable-sized array */ ++#define VAR 1 + + #endif /* HB_PRIVATE_HH */ + diff --git a/mozilla-gcc6.patch b/mozilla-gcc6.patch new file mode 100644 index 0000000..56d2982 --- /dev/null +++ b/mozilla-gcc6.patch @@ -0,0 +1,27 @@ +diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl +--- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 ++++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 +@@ -19,7 +19,9 @@ while () { + open OUT, ">$output_dir/$_"; + print OUT "#pragma GCC system_header\n"; # suppress include_next warning + print OUT "#pragma GCC visibility push(default)\n"; ++ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#include_next \<$_\>\n"; ++ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#pragma GCC visibility pop\n"; + close OUT; + } +diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp +--- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 ++++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 +@@ -104,7 +104,9 @@ check_neon(void) + + # elif defined(__linux__) || defined(ANDROID) + # include ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include ++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include + + enum{ +