Skip to content

Commit

Permalink
Merge pull request rubyjs#35 from nurse/fpic-on-freebsd-amd64
Browse files Browse the repository at this point in the history
FreeBSD amd64 also needs -fPIC.
  • Loading branch information
Logan Lowell committed Apr 2, 2012
2 parents cd9ac89 + c4fee5d commit cc48bc7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/libv8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions lib/libv8/fpic-on-freebsd-amd64.patch
Original file line number Diff line number Diff line change
@@ -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'],

0 comments on commit cc48bc7

Please sign in to comment.