Enable custom shared memory schemes on INTEGRITY

Replaced dependency to libdl.a with libshm_client.a. Defined symbols
'shm_area_password' and 'shm_area_name' internally. The build for
INTEGRITY is static only so libdl.a is not needed.

Change-Id: I7e34528835132d79ea582a30cf9ff61cdda198da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tero Alamäki 2017-07-27 11:43:38 +03:00 committed by Tero Alamaki
parent ee29be91c0
commit f4e0ffb11c
2 changed files with 14 additions and 1 deletions

View File

@ -39,4 +39,4 @@ QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_LFLAGS_RELEASE -g
QMAKE_LFLAGS_CXX11 += --c++11 --thread_local_storage
QMAKE_LFLAGS_EXCEPTIONS_ON += --exceptions
QMAKE_LIBS_CORE = -lposix -livfs -lsocket -lnet -ldl
QMAKE_LIBS_CORE = -lposix -livfs -lsocket -lnet -lshm_client

View File

@ -95,6 +95,19 @@
#include <sys/sysctl.h>
#endif
#if defined(Q_OS_INTEGRITY)
extern "C" {
// Function mmap resides in libshm_client.a. To be able to link with it one needs
// to define symbols 'shm_area_password' and 'shm_area_name', because the library
// is meant to allow the application that links to it to use POSIX shared memory
// without full system POSIX.
# pragma weak shm_area_password
# pragma weak shm_area_name
char *shm_area_password = "dummy";
char *shm_area_name = "dummy";
}
#endif
#include "archdetect.cpp"
#ifdef qFatal