--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
make GYPFLAGS="-Dcomponent=shared_library"
Try make GYPFLAGS="-Dcomponent=static_library"
On Jul 1, 2012, at 10:38 PM, Charles Lowell wrote:On Sunday, July 1, 2012 9:39:55 PM UTC-5, mschwartz wrote:make GYPFLAGS="-Dcomponent=shared_library"Unfortunately, I need to build a static library. If I monkey patch standalone.gypi to put in the -fPIC flag then it works fine, but it would be nice if there were a way to specify this from the command line.
The more interesting question is why he thinks he needs -fPIC for a static library. The error message indicates the elf file contains a 32-bit relocation and it needs to be a 64-bit one.
Position Independent Code (PIC) is typically (almost always) used in shared libraries.
/usr/bin/ld: out/Release/obj.target/deps/v8/tools/gyp/../../../../v8_base.x64/deps/v8/src/accessors.o: relocation R_X86_64_32S against `vtable for v8::internal::StackFrame' can not be used when making a shared object; recompile with -fPIC
out/Release/obj.target/deps/v8/tools/gyp/../../../../v8_base.x64/deps/v8/src/accessors.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
g++ '-DV8_TARGET_ARCH_X64' '-DENABLE_DEBUGGER_SUPPORT' '-DV8_USE_DEFAULT_PLATFORM' '-DENABLE_HANDLE_ZAPPING' -Ideps/v8/src -fno-strict-aliasing -m64 -fdata-sections -ffunction-sections -O3 -MMD -MF out/Release/.deps/out/Release/obj.host/v8_base.x64/deps/v8/src/accessors.o.d.raw -c -o out/Release/obj.host/v8_base.x64/deps/v8/src/accessors.o deps/v8/src/accessors.cc
You can also specify flags when building, I'm doing it like this in one project. It works as expected.
CFLAGS="-fPIC" CXXFLAGS="-fPIC" make native
You can also specify flags when building, I'm doing it like this in one project. It works as expected.CFLAGS="-fPIC" CXXFLAGS="-fPIC" make native
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/1vva9qjvstE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.