summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/unix/gdb_dwarf_index.prf13
-rw-r--r--mkspecs/freebsd-g++/qmake.conf2
-rw-r--r--mkspecs/freebsd-g++40/qmake.conf2
-rw-r--r--mkspecs/linux-g++-32/qmake.conf2
-rw-r--r--mkspecs/linux-g++-64/qmake.conf2
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf2
-rw-r--r--mkspecs/linux-g++/qmake.conf2
-rw-r--r--mkspecs/linux-icc/qmake.conf2
-rw-r--r--mkspecs/linux-llvm/qmake.conf2
-rw-r--r--mkspecs/linux-lsb-g++/qmake.conf2
-rw-r--r--mkspecs/netbsd-g++/qmake.conf2
-rw-r--r--mkspecs/openbsd-g++/qmake.conf2
12 files changed, 24 insertions, 11 deletions
diff --git a/mkspecs/features/unix/gdb_dwarf_index.prf b/mkspecs/features/unix/gdb_dwarf_index.prf
new file mode 100644
index 0000000..7824d93
--- /dev/null
+++ b/mkspecs/features/unix/gdb_dwarf_index.prf
@@ -0,0 +1,13 @@
+!CONFIG(separate_debug_info):CONFIG(debug, debug|release):!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {
+
+ QMAKE_GDB_INDEX = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; \
+ gdb -silent -ex \'set confirm off\' -ex \'save gdb-index .\' -ex quit \'$(TARGET)\' >/dev/null 2>&1 && \
+ test -f $(TARGET).gdb-index && \
+ $$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$(TARGET)\' || true
+
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$QMAKE_GDB_INDEX $$QMAKE_POST_LINK
+
+ silent:QMAKE_POST_LINK = @echo indexing $@ for gdb && $$QMAKE_POST_LINK
+}
+
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
index ac52e0f..9de93d4 100644
--- a/mkspecs/freebsd-g++/qmake.conf
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release link_prl
+CONFIG += qt warn_on release link_prl gdb_dwarf_index
QT += core gui
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
diff --git a/mkspecs/freebsd-g++40/qmake.conf b/mkspecs/freebsd-g++40/qmake.conf
index 3d0851a..bf42711 100644
--- a/mkspecs/freebsd-g++40/qmake.conf
+++ b/mkspecs/freebsd-g++40/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release link_prl
+CONFIG += qt warn_on release link_prl gdb_dwarf_index
QT += core gui
QMAKE_CC = gcc40
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
index 1e5c50b..f425c0d 100644
--- a/mkspecs/linux-g++-32/qmake.conf
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
index e7372cc..b8877a9 100644
--- a/mkspecs/linux-g++-64/qmake.conf
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -8,7 +8,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index a977e7a..8f85c54 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
CONFIG += nostrip
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index 4b21896..d772b5e 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 16e5197..f40a465 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -13,7 +13,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release link_prl
+CONFIG += qt warn_on release link_prl gdb_dwarf_index
QT += core gui
QMAKE_CC = icc
diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf
index 73d6609..77f8d81 100644
--- a/mkspecs/linux-llvm/qmake.conf
+++ b/mkspecs/linux-llvm/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf
index d359625..4197db0 100644
--- a/mkspecs/linux-lsb-g++/qmake.conf
+++ b/mkspecs/linux-lsb-g++/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf
index 4d4270d..ab4b7c3 100644
--- a/mkspecs/netbsd-g++/qmake.conf
+++ b/mkspecs/netbsd-g++/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release link_prl
+CONFIG += qt warn_on release link_prl gdb_dwarf_index
QT += core gui
QMAKE_CC = gcc
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
index f4bb223..56d9416 100644
--- a/mkspecs/openbsd-g++/qmake.conf
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -5,7 +5,7 @@
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
-CONFIG += qt warn_on release link_prl
+CONFIG += qt warn_on release link_prl gdb_dwarf_index
QT += core gui
QMAKE_CC = gcc