summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2011-11-09 17:59:46 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2011-11-09 17:59:46 (GMT)
commit7eb770aed35fee50ff98c12e390dcb02c72b5132 (patch)
treeb65b89dcda4fe6a6f8cd367df2a14a67297d0120 /mkspecs
parent6c24cde00e3a046e6face6f08ec2ed996b54a8f1 (diff)
downloadQt-7eb770aed35fee50ff98c12e390dcb02c72b5132.zip
Qt-7eb770aed35fee50ff98c12e390dcb02c72b5132.tar.gz
Qt-7eb770aed35fee50ff98c12e390dcb02c72b5132.tar.bz2
fix gdb_dwarf_index.prf for executables
Unlike for libraries, $(TARGET) already contains $(DESTDIR). Changing to $(DESTDIR) does break the command in that case. Reviewed-by: ossi
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/unix/gdb_dwarf_index.prf11
1 files changed, 9 insertions, 2 deletions
diff --git a/mkspecs/features/unix/gdb_dwarf_index.prf b/mkspecs/features/unix/gdb_dwarf_index.prf
index 14db4fc..7771ed4 100644
--- a/mkspecs/features/unix/gdb_dwarf_index.prf
+++ b/mkspecs/features/unix/gdb_dwarf_index.prf
@@ -1,8 +1,15 @@
!CONFIG(separate_debug_info):CONFIG(debug, debug|release):!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {
- QMAKE_GDB_INDEX = { test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\"; } && \
+ contains(TEMPLATE, "lib") {
+ QMAKE_GDB_INDEX = { test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\"; } &&
+ QMAKE_GDB_DIR = .
+ } else {
+ QMAKE_GDB_DIR = $(DESTDIR)
+ }
+
+ QMAKE_GDB_INDEX += \
test \$\$(gdb --version | sed -e \'s,[^0-9]\\+\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
- gdb --nx --batch --quiet -ex \'set confirm off\' -ex \'save gdb-index .\' -ex quit \'$(TARGET)\' && \
+ 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