Link against QMAKE_LIBS_EXECINFO when using backtrace(3).
Add a new mkspec variable, QMAKE_LIBS_EXECINFO, for platforms where backtrace(3), backtrace_symbols(3) and others are not in libc, but rather in a separate library -- on the BSDs, this is libexecinfo. Use it in corelib/global/global.pri so that libqt5core links against it and has the proper dependency when necessary. Change-Id: I62ac36c9b3ba7ab0719420cb795087d43ec138a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
86ca4de8a2
commit
350c60b79e
@ -17,6 +17,7 @@ QMAKE_LFLAGS_THREAD = -pthread
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD =
|
||||
QMAKE_LIBS_EXECINFO = -lexecinfo
|
||||
QMAKE_LIBS_X11 = -lXext -lX11 -lm
|
||||
QMAKE_LIBS_OPENGL = -lGL
|
||||
QMAKE_LIBS_THREAD =
|
||||
|
@ -17,6 +17,7 @@ QMAKE_LFLAGS_THREAD = -pthread
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD =
|
||||
QMAKE_LIBS_EXECINFO = -lexecinfo
|
||||
QMAKE_LIBS_X11 = -lXext -lX11 -lm
|
||||
QMAKE_LIBS_OPENGL = -lGL
|
||||
QMAKE_LIBS_THREAD =
|
||||
|
@ -18,6 +18,7 @@ QMAKE_LFLAGS_THREAD = -pthread
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD =
|
||||
QMAKE_LIBS_EXECINFO = -lexecinfo
|
||||
QMAKE_LIBS_X11 = -lXext -lX11 -lm
|
||||
QMAKE_LIBS_OPENGL = -lGL
|
||||
QMAKE_LIBS_THREAD =
|
||||
|
@ -35,6 +35,9 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
|
||||
# Only used on platforms with CONFIG += precompile_header
|
||||
PRECOMPILED_HEADER = global/qt_pch.h
|
||||
|
||||
# qlogging.cpp uses backtrace(3), which is in a separate library on the BSDs.
|
||||
LIBS_PRIVATE += $$QMAKE_LIBS_EXECINFO
|
||||
|
||||
linux*:!cross_compile:!static:!*-armcc* {
|
||||
QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate
|
||||
prog=$$quote(if (/program interpreter: (.*)]/) { print $1; })
|
||||
|
Loading…
Reference in New Issue
Block a user