Skip to content

Commit c857586

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 4fcc2c1 commit c857586

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
@@ -275,6 +275,9 @@
275275
['_type=="static_library" and OS=="solaris"', {
276276
'standalone_static_library': 1,
277277
}],
278+
['OS=="openbsd"', {
279+
'ldflags': [ '-Wl,-z,wxneeded' ],
280+
}],
278281
],
279282
'conditions': [
280283
[ 'target_arch=="ia32"', {

0 commit comments

Comments
 (0)