Skip to content

Commit

Permalink
build: use wxneeded on openbsd
Browse files Browse the repository at this point in the history
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 <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
qbit authored and evanlucas committed Nov 3, 2016
1 parent 212da12 commit f7d8481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
['_type=="static_library" and OS=="solaris"', {
'standalone_static_library': 1,
}],
['OS=="openbsd"', {
'ldflags': [ '-Wl,-z,wxneeded' ],
}],
],
'conditions': [
[ 'target_arch=="ia32"', {
Expand Down

0 comments on commit f7d8481

Please sign in to comment.