From c4fee5da61c7a662464aa18c152822f6aea263a9 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 28 Mar 2012 18:17:45 +0900 Subject: [PATCH] FreeBSD amd64 also needs -fPIC. --- lib/libv8/Makefile | 1 + lib/libv8/fpic-on-freebsd-amd64.patch | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/libv8/fpic-on-freebsd-amd64.patch diff --git a/lib/libv8/Makefile b/lib/libv8/Makefile index 2002f299..1377c3d9 100644 --- a/lib/libv8/Makefile +++ b/lib/libv8/Makefile @@ -25,6 +25,7 @@ $(SCONS): $(SCONSSRC) $(V8SRC): build cp -r v8 build patch -td build/v8 -i ../../fpic-on-linux-amd64.patch + patch -td build/v8 -i ../../fpic-on-freebsd-amd64.patch $(SCONSSRC): build cp -r scons build diff --git a/lib/libv8/fpic-on-freebsd-amd64.patch b/lib/libv8/fpic-on-freebsd-amd64.patch new file mode 100644 index 00000000..b5a7c39b --- /dev/null +++ b/lib/libv8/fpic-on-freebsd-amd64.patch @@ -0,0 +1,16 @@ +diff --git a/SConstruct b/SConstruct +index 4a7e182..b462335 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -124,6 +124,10 @@ LIBRARY_FLAGS = { + 'LIBPATH' : ['/usr/local/lib'], + 'CCFLAGS': ['-ansi'], +- 'LIBS': ['execinfo'] ++ 'LIBS': ['execinfo'], ++ 'arch:x64': { ++ 'CCFLAGS': ['-fPIC'], ++ 'CXXFLAGS': ['-fPIC'] ++ }, + }, + 'os:openbsd': { + 'CPPPATH' : ['/usr/local/include'],