build: use -fPIC for native addons on UNIX

No -fPIC on 32 bits Linux but do enable for the other UNIX flavors.
This commit is contained in:
Nathan Rajlich 2012-02-08 19:47:31 -08:00 committed by Ben Noordhuis
parent 9da830e895
commit d4ccdeaf00
1 changed files with 3 additions and 0 deletions

View File

@ -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' ],
}]
]
}