From f7d8481ee2a3acde403f13ec3bb9b3e81f16992c Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 21 Oct 2016 17:13:42 -0600 Subject: [PATCH] build: use wxneeded on openbsd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On OpenBSD 6.0 and greater W^X is enabled by default. All executables that violate W^X need to be marked with PT_OPENBSD_WXNEEDED. In addition to this, they must be executed from a filesystem mounted with 'wxallowed'. More info on W^X: https://en.wikipedia.org/wiki/W%5EX PR-URL: https://github.com/nodejs/node/pull/9232 Reviewed-By: James M Snell Reviewed-By: Johan Bergström Reviewed-By: Ben Noordhuis --- common.gypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common.gypi b/common.gypi index d1411ed1c6f19c..d87205e5c320cf 100644 --- a/common.gypi +++ b/common.gypi @@ -278,6 +278,9 @@ ['_type=="static_library" and OS=="solaris"', { 'standalone_static_library': 1, }], + ['OS=="openbsd"', { + 'ldflags': [ '-Wl,-z,wxneeded' ], + }], ], 'conditions': [ [ 'target_arch=="ia32"', {