summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <pino@debian.org>2012-04-14 23:44:46 +0200
committerPino Toscano <pino@debian.org>2012-04-14 23:44:46 +0200
commitd6fb2938e0fe2dec2a1ad7020069dc09fc0189fb (patch)
tree4c866a72df61c7fa37636c5047198368dea5392b
parent327d24b35c01f5ec7318104bd8eef5626cadffd4 (diff)
downloadqtwebkit-d6fb2938e0fe2dec2a1ad7020069dc09fc0189fb.tar.gz
fix building with gcc 4.7 (#667346)
backport (parts of) upstream r93631 and r113848, with a small adaptation to use current (and not used-for-qt4 one) g++ minor version
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/upstream_changeset_r113848.diff44
-rw-r--r--debian/patches/upstream_changeset_r93631.diff16
4 files changed, 64 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 08f990e..fd605f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ qtwebkit (2.2.0-4) UNRELEASED; urgency=low
* Add -Wl,--no-relax to the LDFLAGS on alpha. (Closes: #656056)
* Update the symbols file for alpha, armhf and ppc64, and for all the other
archs from their build logs. (Closes: #653905, #656056, #664897)
+ * Backport (parts of) upstream r93631 and r113848 to fix building with
+ GCC 4.7. (Closes: #667346)
[ Felix Geyer ]
* Add Fix_build_with_GLib_2.31_changeset_r97269.patch, cherry-picked from
diff --git a/debian/patches/series b/debian/patches/series
index 5f81aab..85afe41 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,8 @@
# upstream patches
adjust_symbols_visibility_for_webcore.diff
Fix_build_with_GLib_2.31_changeset_r97269.patch
+upstream_changeset_r93631.diff
+upstream_changeset_r113848.diff
# debian patches
01_lflags_as-needed.diff
diff --git a/debian/patches/upstream_changeset_r113848.diff b/debian/patches/upstream_changeset_r113848.diff
new file mode 100644
index 0000000..390d805
--- /dev/null
+++ b/debian/patches/upstream_changeset_r113848.diff
@@ -0,0 +1,44 @@
+Description: Fix the build with gcc 4.7.0
+ .
+ The part in Source/common.pri has been adapted to use the version of g++
+ used during build, not the one used to build Qt4.
+Author: Andras Becsi <andras.becsi@nokia.com>
+Author: Pino Toscano <pino@debian.org>
+Bug: https://bugs.webkit.org/show_bug.cgi?id=83584
+Origin: upstream, http://trac.webkit.org/changeset/113848
+
+--- a/Source/WebCore/html/HTMLImageElement.cpp
++++ b/Source/WebCore/html/HTMLImageElement.cpp
+@@ -74,7 +74,7 @@ PassRefPtr<HTMLImageElement> HTMLImageEl
+ RefPtr<HTMLImageElement> image = adoptRef(new HTMLImageElement(imgTag, document));
+ if (optionalWidth)
+ image->setWidth(*optionalWidth);
+- if (optionalHeight > 0)
++ if (optionalHeight)
+ image->setHeight(*optionalHeight);
+ return image.release();
+ }
+--- a/Source/WebCore/platform/graphics/TiledBackingStoreClient.h
++++ b/Source/WebCore/platform/graphics/TiledBackingStoreClient.h
+@@ -25,6 +25,7 @@ namespace WebCore {
+ #if ENABLE(TILED_BACKING_STORE)
+ class TiledBackingStoreClient {
+ public:
++ virtual ~TiledBackingStoreClient() { }
+ virtual void tiledBackingStorePaintBegin() = 0;
+ virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&) = 0;
+ virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea) = 0;
+--- a/Source/common.pri
++++ b/Source/common.pri
+@@ -5,8 +5,9 @@
+
+ linux-g++ {
+ isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
+- message(Using gold linker)
+- QMAKE_LFLAGS+=-fuse-ld=gold
++ GCC_VERSION_MINOR = $$system($$QMAKE_CXX -dumpversion | sed -r -e 's,\\([0-9]+\\)\\\\.\\([0-9]+\\).*,\\\\2,g')
++ # Upstream gcc 4.7 does not support the -fuse-ld=gold option ( see: http://sourceware.org/ml/binutils/2011-01/msg00178.html )
++ isEqual(QT_GCC_MAJOR_VERSION, 4):lessThan(GCC_VERSION_MINOR, 7):QMAKE_LFLAGS+=-fuse-ld=gold
+ }
+ }
+
diff --git a/debian/patches/upstream_changeset_r93631.diff b/debian/patches/upstream_changeset_r93631.diff
new file mode 100644
index 0000000..9f919cf
--- /dev/null
+++ b/debian/patches/upstream_changeset_r93631.diff
@@ -0,0 +1,16 @@
+Description: Fixed warnings produced by gcc-4.6.0.
+Author: Ahmad Sharif <asharif@chromium.org>
+Bug: https://bugs.webkit.org/show_bug.cgi?id=62168
+Origin: upstream, http://trac.webkit.org/changeset/93631
+
+--- a/Source/WebCore/dom/Element.cpp
++++ b/Source/WebCore/dom/Element.cpp
+@@ -1080,7 +1080,7 @@ void Element::recalcStyle(StyleChange ch
+ {
+ // Ref currentStyle in case it would otherwise be deleted when setRenderStyle() is called.
+ RefPtr<RenderStyle> currentStyle(renderStyle());
+- bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() : false;
++ bool hasParentStyle = parentNodeForRenderingAndStyle() ? static_cast<bool>(parentNodeForRenderingAndStyle()->renderStyle()) : false;
+ bool hasDirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByDirectAdjacentRules();
+ bool hasIndirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByForwardPositionalRules();
+