Remove automated generation of dwarf index

The index is only helpful if the version of GDB to
create it uses the same version as the GDB version
that consumes it. Outside the "local development"
scenario this happens only by conincidence, still
we add ~3.6% to the debug library size and face
maintenance issues like QTBUG-34950.

We also don't see the same performance benefit anymore
with recent versions as we did when the feature was
added, so it's best to not create the index anymore.

People who need it, still can add it manually, or
by the 'gdb-add-index' tool that comes with recent
versions of GDB, or trust their distributors to
set up indexes matching their runtime environment.

Task-number: QTBUG-34950
Change-Id: Id4c79fa51fea9622b0891bd9b9b395b948ecb157
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
hjk 2014-01-14 14:23:49 +01:00 committed by The Qt Project
parent 2b0f02aa5c
commit 9de2853a94
24 changed files with 18 additions and 46 deletions

View File

@ -1,7 +1,7 @@
QT_QPA_DEFAULT_PLATFORM = eglfs
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -7,7 +7,7 @@
# http://github.com/KDAB/OpenEmbedded-Archos
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -5,7 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -3,7 +3,7 @@
# http://beagleboard.org/
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -3,7 +3,7 @@
# http://wiki.qt-project.org/Devices/N9
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_PLATFORM = maemo

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -5,7 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -5,7 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -3,7 +3,7 @@
# http://qt-project.org/wiki/Snowball
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)

View File

@ -1,23 +0,0 @@
!separate_debug_info:have_target:debug:!static:!isEmpty(QMAKE_OBJCOPY) {
contains(TEMPLATE, "lib") {
QMAKE_GDB_INDEX = { test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\"; } &&
QMAKE_GDB_DIR = .
} else {
QMAKE_GDB_INDEX = { test -n \"$(DESTDIR)\" && DESTDIR=\"$(DESTDIR)\" || DESTDIR=.; } &&
QMAKE_GDB_DIR = \$\$DESTDIR
}
QMAKE_GDB_INDEX += \
test \$\$(gdb --version | sed -e \'s,[^0-9][^0-9]*\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
gdb --nx --batch --quiet -ex \'set confirm off\' -ex \"save gdb-index $$QMAKE_GDB_DIR\" -ex quit \'$(TARGET)\' && \
test -f $(TARGET).gdb-index && \
$$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$(TARGET)\' && \
$$QMAKE_DEL_FILE $(TARGET).gdb-index || 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
}

View File

@ -4,7 +4,6 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = freebsd bsd
CONFIG += gdb_dwarf_index
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE

View File

@ -4,7 +4,6 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = freebsd bsd
CONFIG += gdb_dwarf_index
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE

View File

@ -4,7 +4,7 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = hurd
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS_THREAD += -D_REENTRANT

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m32

View File

@ -6,7 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m64

View File

@ -4,7 +4,7 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = maemo
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
CONFIG += nostrip
QMAKE_INCREMENTAL_STYLE = sublib

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)

View File

@ -3,7 +3,6 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += gdb_dwarf_index
QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)

View File

@ -3,7 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)

View File

@ -4,7 +4,6 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = netbsd bsd
CONFIG += gdb_dwarf_index
QMAKE_COMPILER = gcc

View File

@ -4,7 +4,6 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = openbsd bsd
CONFIG += gdb_dwarf_index
QMAKE_COMPILER = gcc