From fa98adbd04de9d44ce921436b92589a41f285dcd Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 25 May 2020 18:53:31 +0200 Subject: Fix compilation of PCRE2 under Intel CET Ubuntu 20.04 enables -fcf-protection by default. PCRE2 10.35 sees this but complains that -mshstk is also necessary to build its JIT. Detect whether the compiler is enabling Intel CET automatically, and if so, build PCRE2 with the right options. Pick-to: 5.15 Change-Id: I3440e689b81f4f07055f211a4fa7331a43eb410d Reviewed-by: Thiago Macieira --- src/3rdparty/pcre2/pcre2.pri | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/3rdparty') diff --git a/src/3rdparty/pcre2/pcre2.pri b/src/3rdparty/pcre2/pcre2.pri index fa901f783f..b11ec7302a 100644 --- a/src/3rdparty/pcre2/pcre2.pri +++ b/src/3rdparty/pcre2/pcre2.pri @@ -5,6 +5,11 @@ win32: MODULE_DEFINES += PCRE2_STATIC DEFINES += HAVE_CONFIG_H +qtConfig(intelcet) { + QMAKE_CFLAGS += QMAKE_CFLAGS_SHSTK + QMAKE_CXXFLAGS += QMAKE_CXXFLAGS_SHSTK +} + SOURCES += \ $$PWD/src/pcre2_auto_possess.c \ $$PWD/src/pcre2_chartables.c \ -- cgit v1.2.3