summarylogtreecommitdiffstats
path: root/0005-Build-with-smaller-debug-info.patch
blob: 7911114fecdca419cf8e7d8d9f1305ddf97b8a6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From 61bf0f4560c108b844d3807d10852efc5a2da47b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 22:13:44 +0200
Subject: [PATCH 5/9] Build with smaller debug info

Avoid exceeding 4 GB size limit
---
 Source/JavaScriptCore/JavaScriptCore.pri | 6 ++++++
 Source/WTF/WTF.pri                       | 6 ++++++
 Source/WebCore/WebCore.pri               | 7 +++++++
 Source/WebKit/WebKit1.pri                | 6 ++++++
 Source/WebKit2/WebKit2.pri               | 6 ++++++
 5 files changed, 31 insertions(+)

diff --git a/Source/JavaScriptCore/JavaScriptCore.pri b/Source/JavaScriptCore/JavaScriptCore.pri
index dec9d42a9..910fc4eda 100644
--- a/Source/JavaScriptCore/JavaScriptCore.pri
+++ b/Source/JavaScriptCore/JavaScriptCore.pri
@@ -7,6 +7,12 @@
 
 SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/JavaScriptCore
 
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+#    message("JavaScriptCore workaround for QtWebkit: do not build with -g, but with -g1")
+#    QMAKE_CXXFLAGS -= -g
+#    QMAKE_CXXFLAGS += -g1
+#}
+
 JAVASCRIPTCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/JavaScriptCore/$${GENERATED_SOURCES_DESTDIR}
 
 INCLUDEPATH += \
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
index b553075c2..64877cb3b 100644
--- a/Source/WTF/WTF.pri
+++ b/Source/WTF/WTF.pri
@@ -8,6 +8,12 @@
 # All external modules should include WTF headers by prefixing with "wtf" (#include <wtf/some/thing.h>).
 INCLUDEPATH += $$PWD
 
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+#    message("WTF workaround for QtWebkit: do not build with -g, but with -g1")
+#    QMAKE_CXXFLAGS -= -g
+#    QMAKE_CXXFLAGS += -g1
+#}
+
 mac {
     # Mac OS does ship libicu but not the associated header files.
     # Therefore WebKit provides adequate header files.
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index 26e9b8424..d6c32e80c 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -7,6 +7,12 @@
 
 SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebCore
 
+equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+    message("WebCore workaround for QtWebkit: do not build with -g, but with -g1")
+    QMAKE_CXXFLAGS -= -g
+    QMAKE_CXXFLAGS += -g1
+}
+
 QT *= network sql core-private gui-private
 
 WEBCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebCore/$${GENERATED_SOURCES_DESTDIR}
@@ -316,6 +322,7 @@ mac {
 unix:!mac:*-g++*:QMAKE_CXXFLAGS += -fdata-sections
 unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
 linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
+win32:!equals(QT_ARCH, powerpc):!equals(QT_ARCH, s390):!equals(QT_ARCH, mips):!equals(QT_ARCH, arm):QMAKE_LFLAGS += -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
 
 enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
 
diff --git a/Source/WebKit/WebKit1.pri b/Source/WebKit/WebKit1.pri
index 6fc182941..d86b8469c 100644
--- a/Source/WebKit/WebKit1.pri
+++ b/Source/WebKit/WebKit1.pri
@@ -7,6 +7,12 @@
 
 SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit
 
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+#    message("WebKit workaround for QtWebkit: do not build with -g, but with -g1")
+#    QMAKE_CXXFLAGS -= -g
+#    QMAKE_CXXFLAGS += -g1
+#}
+
 INCLUDEPATH += \
     $$SOURCE_DIR/qt/Api \
     $$SOURCE_DIR/qt/WebCoreSupport \
diff --git a/Source/WebKit2/WebKit2.pri b/Source/WebKit2/WebKit2.pri
index 3611524e6..f54b9cabf 100644
--- a/Source/WebKit2/WebKit2.pri
+++ b/Source/WebKit2/WebKit2.pri
@@ -9,6 +9,12 @@ SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit2
 
 WEBKIT2_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebKit2/$${GENERATED_SOURCES_DESTDIR}
 
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+#    message("WebKit2 workaround for QtWebkit: do not build with -g, but with -g1")
+#    QMAKE_CXXFLAGS -= -g
+#    QMAKE_CXXFLAGS += -g1
+#}
+
 INCLUDEPATH += \
     $$SOURCE_DIR \
     $$SOURCE_DIR/Platform \
-- 
2.13.0