Index: build/toolchain.gypi |
=================================================================== |
--- build/toolchain.gypi (revision 20889) |
+++ build/toolchain.gypi (working copy) |
@@ -66,6 +66,10 @@ |
# Some versions of GCC 4.5 seem to need -fno-strict-aliasing. |
'v8_no_strict_aliasing%': 0, |
+ # When you are statically embedding V8 into a shared library, you might |
+ # need to force position-independent code generation. |
+ 'v8_force_pic%': 0, |
+ |
# Chrome needs this definition unconditionally. For standalone V8 builds, |
# it's handled in build/standalone.gypi. |
'want_separate_host_toolset%': 1, |
@@ -423,6 +427,9 @@ |
[ 'v8_no_strict_aliasing==1', { |
'cflags': [ '-fno-strict-aliasing' ], |
}], |
+ [ 'v8_force_pic==1', { |
+ 'cflags': [ '-fPIC' ], |
+ }], |
], # conditions |
}], |
['OS=="solaris"', { |