Skip to content

Commit 59d821d

Browse files
qbitMyles Borins
authored and
Myles Borins
committed
build: use wxneeded on openbsd
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: #9232 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent ed31f9c commit 59d821d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common.gypi

+3
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@
276276
['_type=="static_library" and OS=="solaris"', {
277277
'standalone_static_library': 1,
278278
}],
279+
['OS=="openbsd"', {
280+
'ldflags': [ '-Wl,-z,wxneeded' ],
281+
}],
279282
],
280283
'conditions': [
281284
[ 'target_arch=="ia32"', {

0 commit comments

Comments
 (0)