summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/configure.json10
-rw-r--r--src/core/core_module.pro2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/configure.json b/src/core/configure.json
index fc23785df..6dccd1644 100644
--- a/src/core/configure.json
+++ b/src/core/configure.json
@@ -327,6 +327,11 @@
"webengine-arm-thumb" : {
"label": "thumb instruction set",
"type": "hasThumbFlag"
+ },
+ "webengine-noexecstack" : {
+ "label": "linker supports -z noexecstack",
+ "type": "linkerSupportsFlag",
+ "flag": "-z,noexecstack"
}
},
@@ -658,6 +663,11 @@
"label": "Thumb instruction set",
"condition": "config.linux && features.webengine-embedded-build && arch.arm && tests.webengine-arm-thumb",
"output": [ "privateFeature" ]
+ },
+ "webengine-noexecstack": {
+ "label": "linker supports -z noexecstack",
+ "condition": "config.unix && tests.webengine-noexecstack",
+ "output": [ "privateFeature" ]
}
},
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index b5c8542f3..9bd56f9de 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -39,6 +39,8 @@ LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
# GN's LFLAGS doesn't always work across all the Linux configurations we support.
# The Windows and macOS ones from GN does provide a few useful flags however
+unix:qtConfig(webengine-noexecstack): \
+ QMAKE_LFLAGS += -Wl,-z,noexecstack
linux {
QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now
# Embedded address sanitizer symbols are undefined and are picked up by the dynamic link loader