diff --git a/node.gyp b/node.gyp index daf06c7a7a0..2f5cf0e5654 100644 --- a/node.gyp +++ b/node.gyp @@ -365,6 +365,12 @@ 'PLATFORM="sunos"', ], }], + [ 'OS=="freebsd" or OS=="linux"', { + 'ldflags': [ '-Wl,-z,noexecstack' ], + }], + [ 'OS=="sunos"', { + 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], + }], [ 'OS in "linux freebsd" and node_shared_v8=="false"', { 'ldflags': [