libQtWebKit.so has no debug info (#667175)

This commit is contained in:
Rex Dieter 2011-02-23 14:47:28 -06:00
parent cf709d7572
commit 2d670be15f
3 changed files with 237 additions and 2 deletions

View File

@ -0,0 +1,213 @@
From 9e5a1b618ea7bf579c7b2d66a8844d606405bc6d Mon Sep 17 00:00:00 2001
From: Anders Bakken <agbakken@gmail.com>
Date: Mon, 20 Sep 2010 19:14:10 +0200
Subject: [PATCH] Enable building Qt/Webkit with debug symbols
With this patch one can configure with -webkit-debug to build Webkit
with debug symbols without having to manually edit WebCore.pro.
Merge-request: 816
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
---
configure | 50 +++++++++++++++++++------------
src/3rdparty/webkit/WebCore/WebCore.pro | 2 +-
tools/configure/configureapp.cpp | 16 ++++++++--
3 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/configure b/configure
index da6fb0a..4316cc8 100755
--- a/configure
+++ b/configure
@@ -686,7 +686,7 @@ CFG_AUDIO_BACKEND=auto
CFG_SVG=auto
CFG_DECLARATIVE=auto
CFG_DECLARATIVE_DEBUG=yes
-CFG_WEBKIT=auto # (yes|no|auto)
+CFG_WEBKIT=auto # (yes|no|auto|debug)
CFG_JAVASCRIPTCORE_JIT=auto
CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
@@ -939,13 +939,26 @@ while [ "$#" -gt 0 ]; do
VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
;;
+ #WebKit options
+ -webkit)
+ VAR="webkit"
+ VAL="yes"
+ ;;
+ -webkit-debug)
+ VAR="webkit"
+ VAL="debug"
+ ;;
+ -no-webkit)
+ VAR="webkit"
+ VAL="no"
+ ;;
#Qt style no options
-no-*)
VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -2010,15 +2023,8 @@ while [ "$#" -gt 0 ]; do
fi
;;
webkit)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
- CFG_WEBKIT="yes"
- else
- if [ "$VAL" = "no" ]; then
- CFG_WEBKIT="no"
- else
- UNKNOWN_OPT=yes
- fi
- fi
+ [ "$VAL" = "auto" ] && VAL="yes"
+ CFG_WEBKIT="$VAL"
;;
javascript-jit)
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
@@ -3535,10 +3541,10 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
[-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
[-no-openssl] [-openssl] [-openssl-linked]
- [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
+ [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
+ [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools]
[-no-declarative] [-declarative][-no-declarative-debug] [-declarative-debug]
-
[additional platform specific options (see below)]
@@ -3690,6 +3696,7 @@ fi
-no-webkit ......... Do not build the WebKit module.
+ -webkit ............ Build the WebKit module.
WebKit is built if a decent C++ compiler is used.
+ -webkit-debug ...... Build the WebKit module with debug symbols.
-no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
+ -javascript-jit .... Build the JavaScriptCore JIT compiler.
@@ -7191,14 +7198,15 @@ if [ "$CFG_WEBKIT" = "auto" ]; then
CFG_WEBKIT="$canBuildWebKit"
fi
-if [ "$CFG_WEBKIT" = "yes" ]; then
+if [ "$CFG_WEBKIT" != "no" ]; then
# This include takes care of adding "webkit" to QT_CONFIG.
cp -f "$relpath/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri" "$outpath/mkspecs/modules/qt_webkit_version.pri"
# The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
- CFG_WEBKIT="yes"
+ if [ "$CFG_WEBKIT" = "debug" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
+ fi
else
rm -f "$outpath/mkspecs/modules/qt_webkit_version.pri"
- CFG_WEBKIT="no"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT"
fi
@@ -8130,7 +8138,7 @@ EOF
*) ;;
esac
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
cat <<EOF
WARNING: DWARF2 debug symbols are not enabled. Linking webkit
in debug mode will run out of memory on systems with 2GB or less.
@@ -8207,8 +8215,12 @@ echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
echo "Phonon module .......... $CFG_PHONON"
echo "Multimedia module ...... $CFG_MULTIMEDIA"
echo "SVG module ............. $CFG_SVG"
-echo "WebKit module .......... $CFG_WEBKIT"
-if [ "$CFG_WEBKIT" = "yes" ]; then
+case "$CFG_WEBKIT" in
+ yes) echo "WebKit module .......... yes" ;;
+ debug) echo "WebKit module .......... yes (debug)" ;;
+ no) echo "WebKit module .......... no" ;;
+esac
+if [ "$CFG_WEBKIT" != "no" ]; then
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
else
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 5f688f3..6b21d8a 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -2952,7 +2952,7 @@ HEADERS += $$WEBKIT_API_HEADERS
}
}
-CONFIG(QTDIR_build) {
+!CONFIG(webkit-debug):CONFIG(QTDIR_build) {
# Remove the following 2 lines if you want debug information in WebCore
CONFIG -= separate_debug_info
CONFIG += no_debug_info
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a2c7fe9..17bbadf 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -958,6 +958,8 @@ void Configure::parseCmdLine()
dictionary[ "WEBKIT" ] = "no";
} else if (configCmdLine.at(i) == "-webkit") {
dictionary[ "WEBKIT" ] = "yes";
+ } else if (configCmdLine.at(i) == "-webkit-debug") {
+ dictionary[ "WEBKIT" ] = "debug";
} else if (configCmdLine.at(i) == "-no-declarative") {
dictionary[ "DECLARATIVE" ] = "no";
} else if (configCmdLine.at(i) == "-declarative") {
@@ -1651,7 +1653,7 @@ bool Configure::displayHelp()
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
- "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
+ "[-no-webkit] [-webkit] [-webkit-debug] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1835,6 +1837,7 @@ bool Configure::displayHelp()
desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia");
desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module");
desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)");
+ desc("WEBKIT", "debug", "-webkit-debug", "Compile in the WebKit module with debug symbols.");
desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module.");
desc("SCRIPT", "yes", "-script", "Build the QtScript module.");
desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module.");
@@ -2692,10 +2695,12 @@ void Configure::generateOutputVars()
QString dst = buildPath + "/mkspecs/modules/qt_webkit_version.pri";
QFile::remove(dst);
- if (dictionary["WEBKIT"] == "yes") {
+ if (dictionary["WEBKIT"] != "no") {
// This include takes care of adding "webkit" to QT_CONFIG.
QString src = sourcePath + "/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri";
QFile::copy(src, dst);
+ if (dictionary["WEBKIT"] == "debug")
+ qtConfig += "webkit-debug";
}
if (dictionary["DECLARATIVE"] == "yes") {
@@ -3406,7 +3411,12 @@ void Configure::displayConfig()
cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl;
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl;
- cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl;
+ {
+ QString webkit = dictionary[ "WEBKIT" ];
+ if (webkit == "debug")
+ webkit = "yes (debug)";
+ cout << "WebKit support.............." << webkit;
+ }
cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
--
1.6.1

View File

@ -0,0 +1,12 @@
diff -up qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro.webkit_debug_2 qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
--- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro.webkit_debug_2 2010-11-05 20:55:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro 2011-02-23 14:34:32.891416772 -0600
@@ -36,7 +36,7 @@ CONFIG(QTDIR_build) {
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
-CONFIG(QTDIR_build) {
+!CONFIG(webkit-debug):CONFIG(QTDIR_build) {
# Remove the following 2 lines if you want debug information in JavaScriptCore
CONFIG -= separate_debug_info
CONFIG += no_debug_info

14
qt.spec
View File

@ -18,7 +18,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.7.1
Release: 17%{?dist}
Release: 18%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@ -104,6 +104,11 @@ Patch102: qt-everywhere-opensource-4.7.1-QTBUG-15857-2.patch
# qsortfilterproxymodel merge, http://qt.gitorious.org/qt/qt/merge_requests/934
Patch103: qt-everywhere-opensource-src-4.7.1-qsortfilterproxymodel_merge934.patch
# support -webkit-debug
Patch104: http://qt.gitorious.org/qt/qt/commit/9e5a1b618ea7bf579c7b2d66a8844d606405bc6d.patch
# followup adding support to webkit/JavaScriptCore too
# UPSTREAM ME
Patch105: qt-everywhere-opensource-src-4.7.1-webkit_debug_javascriptcore.patch
# kde-qt git patches
Patch202: 0002-This-patch-makes-override-redirect-windows-popup-men.patch
@ -158,7 +163,7 @@ Source31: hi48-app-qt4-logo.png
%define phonon_version 4.3.80
%define phonon_version_major 4.3
%define phonon_release 1
%define webkit -webkit
%define webkit -webkit-debug
%define gtkstyle -gtkstyle
%define dbus -dbus-linked
@ -506,6 +511,8 @@ Qt libraries used for drawing widgets and OpenGL items.
%patch101 -p1 -b .qtextcursor-crash
%patch102 -p1 -b .QTBUG-15857-2
%patch103 -p1 -b .qsortfilterproxymodel_merge934
%patch104 -p1 -b .webkit_debug
%patch105 -p1 -b .webkit_debug_javascriptcore
# kde-qt branch
%if 0%{?kde_qt}
@ -1200,6 +1207,9 @@ fi
%changelog
* Wed Feb 23 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.1-18
- libQtWebKit.so has no debug info (#667175)
* Wed Feb 16 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.1-17
- Obsoletes: qt-sqlite < 1:4.7.1-16