From d4ccdeaf00d7994b4a959a3ddfe8c52a2bd3c30d Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Wed, 8 Feb 2012 19:47:31 -0800 Subject: [PATCH] build: use -fPIC for native addons on UNIX No -fPIC on 32 bits Linux but do enable for the other UNIX flavors. --- tools/addon.gypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/addon.gypi b/tools/addon.gypi index e8fb4e2897..a38e7c50d2 100644 --- a/tools/addon.gypi +++ b/tools/addon.gypi @@ -15,6 +15,9 @@ }], [ 'OS=="win"', { 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], + }], + [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', { + 'cflags': [ '-fPIC' ], }] ] }