summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.json16
-rw-r--r--mkspecs/common/gcc-base-unix.conf1
-rw-r--r--mkspecs/features/default_post.prf1
3 files changed, 18 insertions, 0 deletions
diff --git a/configure.json b/configure.json
index 6a37695d02..50d426594a 100644
--- a/configure.json
+++ b/configure.json
@@ -307,6 +307,11 @@
"type": "linkerSupportsFlag",
"flag": "--enable-new-dtags"
},
+ "gdb_index": {
+ "label": "gdb index support",
+ "type": "linkerSupportsFlag",
+ "flag": "--gdb-index"
+ },
"reduce_exports": {
"label": "symbol visibility support",
"type": "compile",
@@ -813,6 +818,12 @@
"condition": "config.linux && tests.enable_new_dtags",
"output": [ "privateConfig" ]
},
+ "enable_gdb_index": {
+ "label": "Generating GDB index",
+ "autoDetect": "features.developer-build",
+ "condition": "config.gcc && !config.clang && (features.debug || features.force_debug_info || features.debug_and_release) && tests.gdb_index",
+ "output": [ "privateConfig" ]
+ },
"reduce_exports": {
"label": "Reduce amount of exported symbols",
"condition": "!config.win32 && tests.reduce_exports",
@@ -1265,6 +1276,11 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
"args": "enable_new_dtags",
"condition": "config.linux"
},
+ {
+ "type": "feature",
+ "args": "enable_gdb_index",
+ "condition": "config.gcc && !config.clang && (features.debug || features.force_debug_info || features.debug_and_release)"
+ },
"precompile_header",
"ltcg",
{
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
index 2d63877dc9..700f228c36 100644
--- a/mkspecs/common/gcc-base-unix.conf
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -19,6 +19,7 @@ QMAKE_LFLAGS_THREAD +=
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
QMAKE_LFLAGS_NEW_DTAGS = -Wl,--enable-new-dtags
+QMAKE_LFLAGS_GDB_INDEX = -Wl,--gdb-index
QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
# -Bsymbolic-functions (ld) support
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 7e027325bd..9eba5bcf00 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -80,6 +80,7 @@ stack_protector_strong {
!host_build|!cross_compile {
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
+ enable_gdb_index: QMAKE_LFLAGS += $$QMAKE_LFLAGS_GDB_INDEX
}
dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL