From 60eb674ffe4ec1669a9a2e5f40807d8143d2f06e Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 21 Oct 2016 17:13:42 -0600 Subject: [PATCH 1/2] 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 --- 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"', { From 64bf5f989266632d6f9bec32b0f4e2be5afc4267 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sun, 23 Oct 2016 07:40:12 -0600 Subject: [PATCH 2/2] deps: back port OpenBSD fix in c-ares/c-ares PR-URL: https://github.com/c-ares/c-ares/pull/68 --- deps/cares/include/ares.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/cares/include/ares.h b/deps/cares/include/ares.h index cd94d4fc628cb2..c23ea3e2e0ad27 100644 --- a/deps/cares/include/ares.h +++ b/deps/cares/include/ares.h @@ -38,7 +38,7 @@ require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || defined(__ANDROID__) + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) #include #endif #if (defined(NETWARE) && !defined(__NOVELL_LIBC__))