[arch-commits] Commit in xulrunner/trunk (Bug-1269171.patch PKGBUILD mozconfig)
Connor Behan
cbehan at archlinux.org
Thu Jun 22 00:29:42 UTC 2017
Date: Thursday, June 22, 2017 @ 00:29:41
Author: cbehan
Revision: 239387
upgpkg: xulrunner 41.0.2-11
Go back to gcc5 so that it will build
Added:
xulrunner/trunk/Bug-1269171.patch
Modified:
xulrunner/trunk/PKGBUILD
xulrunner/trunk/mozconfig
-------------------+
Bug-1269171.patch | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 18 ++++--
mozconfig | 4 +
3 files changed, 155 insertions(+), 6 deletions(-)
Added: Bug-1269171.patch
===================================================================
--- Bug-1269171.patch (rev 0)
+++ Bug-1269171.patch 2017-06-22 00:29:41 UTC (rev 239387)
@@ -0,0 +1,139 @@
+diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h
+--- a/config/gcc-stl-wrapper.template.h
++++ b/config/gcc-stl-wrapper.template.h
+@@ -22,21 +22,34 @@
+ #define NOMINMAX 1
+ #endif
+
++#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
++// Enable checked iterators and other goodies
++//
++// FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
++// Figure out how to resolve this with -fno-rtti. Maybe build with
++// -frtti in DEBUG builds?
++//
++// # define _GLIBCXX_DEBUG 1
++#endif
++
+ // Don't include mozalloc for cstdlib. See bug 1245076.
+ #ifndef moz_dont_include_mozalloc_for_cstdlib
+ # define moz_dont_include_mozalloc_for_cstdlib
+ #endif
+-#ifndef moz_dont_include_mozalloc_for_${HEADER}
+-// mozalloc.h wants <new>; break the cycle by always explicitly
+-// including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
+-//
+-// `#include_next' does not distinguish between <file> and "file"
+-// inclusion, nor does it check that the file you specify has the
+-// same name as the current file. It simply looks for the file
+-// named, starting with the directory in the search path after the
+-// one where the current file was found.
+-# include_next <new>
+
++// Include mozalloc after the STL header and all other headers it includes
++// have been preprocessed.
++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
++ !defined(moz_dont_include_mozalloc_for_${HEADER})
++# define MOZ_INCLUDE_MOZALLOC_H
++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
++#endif
++
++#pragma GCC visibility push(default)
++#include_next <${HEADER}>
++#pragma GCC visibility pop
++
++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
+ // See if we're in code that can use mozalloc. NB: this duplicates
+ // code in nscore.h because nscore.h pulls in prtypes.h, and chromium
+ // can't build with that being included before base/basictypes.h.
+@@ -45,23 +58,8 @@
+ # else
+ # error "STL code can only be used with infallible ::operator new()"
+ # endif
+-
+-#endif
+-
+-#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
+-// Enable checked iterators and other goodies
+-//
+-// FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
+-// Figure out how to resolve this with -fno-rtti. Maybe build with
+-// -frtti in DEBUG builds?
+-//
+-// # define _GLIBCXX_DEBUG 1
+ #endif
+
+-#pragma GCC visibility push(default)
+-#include_next <${HEADER}>
+-#pragma GCC visibility pop
+-
+ // gcc calls a __throw_*() function from bits/functexcept.h when it
+ // wants to "throw an exception". functexcept exists nominally to
+ // support -fno-exceptions, but since we'll always use the system
+diff --git a/config/make-stl-wrappers.py b/config/make-stl-wrappers.py
+--- a/config/make-stl-wrappers.py
++++ b/config/make-stl-wrappers.py
+@@ -25,28 +25,26 @@
+ def is_comment(line):
+ return re.match(r'\s*#.*', line)
+
+ def main(outdir, compiler, template_file, header_list_file):
+ if not os.path.isdir(outdir):
+ os.mkdir(outdir)
+
+ template = open(template_file, 'r').read()
+- path_to_new = header_path('new', compiler)
+
+ for header in open(header_list_file, 'r'):
+ header = header.rstrip()
+ if 0 == len(header) or is_comment(header):
+ continue
+
+ path = header_path(header, compiler)
+ with FileAvoidWrite(os.path.join(outdir, header)) as f:
+ f.write(string.Template(template).substitute(HEADER=header,
+- HEADER_PATH=path,
+- NEW_HEADER_PATH=path_to_new))
++ HEADER_PATH=path))
+
+
+ if __name__ == '__main__':
+ if 5 != len(sys.argv):
+ print("""Usage:
+ python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE
+ """.format(sys.argv[0]), file=sys.stderr)
+ sys.exit(1)
+diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h
+--- a/memory/mozalloc/mozalloc.h
++++ b/memory/mozalloc/mozalloc.h
+@@ -7,20 +7,27 @@
+
+ #ifndef mozilla_mozalloc_h
+ #define mozilla_mozalloc_h
+
+ /*
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=427099
+ */
+
+-#include <stdlib.h>
+-#include <string.h>
+ #if defined(__cplusplus)
+ # include <new>
++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the
++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code
++// using things defined there. Specifically, with stdlib.h, the use of abs()
++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs()
++# include <cstdlib>
++# include <cstring>
++#else
++# include <stdlib.h>
++# include <string.h>
+ #endif
+
+ #if defined(__cplusplus)
+ #include "mozilla/fallible.h"
+ #include "mozilla/TemplateLib.h"
+ #endif
+ #include "mozilla/Attributes.h"
+ #include "mozilla/Types.h"
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-06-22 00:06:17 UTC (rev 239386)
+++ PKGBUILD 2017-06-22 00:29:41 UTC (rev 239387)
@@ -5,17 +5,18 @@
pkgname=xulrunner
pkgver=41.0.2
-pkgrel=10
+pkgrel=11
pkgdesc="Mozilla Runtime Environment"
arch=('i686' 'x86_64')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'mozilla-common' 'nss>3.18' 'libxt' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'libpulse' 'libevent' 'libvpx' 'icu' 'python2')
-makedepends=('zip' 'unzip' 'pkg-config' 'diffutils' 'yasm' 'mesa' 'gconf' 'autoconf2.13' 'gst-plugins-base-libs')
+makedepends=('gcc5' 'zip' 'unzip' 'pkg-config' 'diffutils' 'yasm' 'mesa' 'gconf' 'autoconf2.13' 'gst-plugins-base-libs')
url="http://wiki.mozilla.org/XUL:Xul_Runner"
source=(https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$pkgver/source/xulrunner-$pkgver.source.tar.xz
mozconfig
freetype261.patch
0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
+ Bug-1269171.patch
LFS_graphite2_harfbuzz.patch
mozilla-pkgconfig.patch
shared-libs.patch
@@ -24,9 +25,10 @@
options=('!emptydirs' '!makeflags' 'staticlibs')
replaces=('xulrunner-oss')
sha256sums=('f7abb2e2989779305ab1f80d30caf9fc55d96c7e66d1394e2cc9639442e2b864'
- '8c91a46e16652a6e30e52678955e801e620d10576edef7be32080815b002562e'
+ 'd9f5f9f03f2d70f8cdf3997f22b67ca5e441d9134c0e3b7b19e867054b33b15d'
'3aea9a83bf304da5525f34a911712cf42f8ded1c8b6becf0a2cf8a4b4f7facd6'
'13a27a385fab88938ac7417f1e7ca7225ec6b88840bafe67e0f5642e5446554a'
+ 'bd78da5d5319c8eb6a9195c3bd35bf919f9a9c030d69890f42e96171e32be60f'
'afcd7d3f6113b0f9ead0cb1b47b3fccedadce56a16b4406c439411864bd11863'
'1aa9ebe67542a2b8c28905d070829ada5b29438c6a7961f2b0cdd6b92d8b9f5c'
'59d9fc421bc10a5515b73e159f44a72365bf7b7e8b3fc8a8c46043ef40bd3a40'
@@ -37,9 +39,6 @@
cd "$srcdir/mozilla-release"
cp "$srcdir/mozconfig" .mozconfig
- # GCC6
- patch -Np1 -i ../gcc6.diff
-
# https://bugzilla.mozilla.org/show_bug.cgi?id=1329272
patch -Np1 -i ../sed43.patch
@@ -49,8 +48,15 @@
# https://bugzilla.mozilla.org/show_bug.cgi?id=1233963
patch -Np1 -i ../0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
+ # It would be great to track down all the gcc7 fixes
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1269171
+ #patch -Np1 -i ../gcc6.diff
+ #patch -Np1 -i ../Bug-1269171.patch
+
# https://bugzilla.mozilla.org/show_bug.cgi?id=847568
patch -Np1 -i ../LFS_graphite2_harfbuzz.patch
+ sed -i -e "s|lcrmf|lm|g" configure.in
+ sed -i -e "/lcrmf/d" config/external/nss/crmf/moz.build
rm configure
autoconf-2.13
Modified: mozconfig
===================================================================
--- mozconfig 2017-06-22 00:06:17 UTC (rev 239386)
+++ mozconfig 2017-06-22 00:29:41 UTC (rev 239387)
@@ -1,5 +1,8 @@
. $topsrcdir/xulrunner/config/mozconfig
+export CC=gcc-5
+export CXX=g++-5
+
ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib
@@ -31,3 +34,4 @@
# https://bugzilla.mozilla.org/show_bug.cgi?id=955876
#ac_add_options --enable-release
+ac_add_options --disable-gold
More information about the arch-commits
mailing list