mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
add -fPIC on linux x64 build
This commit is contained in:
parent
d07cf34415
commit
6c1e42dbba
2 changed files with 15 additions and 0 deletions
1
Rakefile
1
Rakefile
|
@ -22,6 +22,7 @@ task :checkout do
|
|||
# Fix gyp trying to build platform-linux on FreeBSD 9 and FreeBSD 10.
|
||||
# Based on: https://chromiumcodereview.appspot.com/10079030/patch/1/2
|
||||
sh "patch -N -p0 -d vendor/v8 < patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch"
|
||||
sh "patch -N -p1 -d vendor/v8 < patches/fPIC-on-linux-x64.patch"
|
||||
end
|
||||
|
||||
desc "compile v8 via the ruby extension mechanism"
|
||||
|
|
14
patches/fPIC-on-linux-x64.patch
Normal file
14
patches/fPIC-on-linux-x64.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff --git a/build/standalone.gypi b/build/standalone.gypi
|
||||
index ebdf557..c7a59bc 100644
|
||||
--- a/build/standalone.gypi
|
||||
+++ b/build/standalone.gypi
|
||||
@@ -98,6 +98,9 @@
|
||||
[ 'OS=="linux"', {
|
||||
'cflags': [ '-ansi' ],
|
||||
}],
|
||||
+ [ 'OS=="linux" and v8_target_arch=="x64" and component=="static_library"', {
|
||||
+ 'cflags': [ '-fPIC', ],
|
||||
+ }],
|
||||
[ 'visibility=="hidden"', {
|
||||
'cflags': [ '-fvisibility=hidden' ],
|
||||
}],
|
Loading…
Reference in a new issue