diff options
-rw-r--r-- | src/corelib/global/global.pri | 7 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 8991379..0fe757d 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -1,5 +1,4 @@ # Qt kernel library base module -linux-g++*:QMAKE_LFLAGS += -Wl,-e,qt_core_init_boilerplate HEADERS += \ global/qglobal.h \ @@ -19,3 +18,9 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global # Only used on platforms with CONFIG += precompile_header PRECOMPILED_HEADER = global/qt_pch.h + +linux-g++*:!static { + QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate + prog=$$quote(if (/program interpreter: (.*)]/) { print $1; }) + DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" +} diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 62c9459..cc5fb48 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -483,16 +483,15 @@ QLibraryInfo::location(LibraryLocation loc) QT_END_NAMESPACE -#if defined(Q_CC_GNU) && defined(Q_OS_LINUX) && !defined(QT_LINUXBASE) && !defined(QT_BOOTSTRAPPED) - +#if defined(Q_CC_GNU) && defined(ELF_INTERPRETER) # include <stdio.h> # include <stdlib.h> extern const char qt_core_interpreter[] __attribute__((section(".interp"))) - = "/lib/ld-linux.so.2"; + = ELF_INTERPRETER; extern "C" -void qt_core_init_boilerplate() +void qt_core_boilerplate() { printf("This is the QtCore library version " QT_VERSION_STR "\n" "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n" |