Fix Spidermonkey formula
The Spidermonkey makefiles hardcoded the compilers that are used. Which broke when used with gcc 4.2 cflags.
This commit is contained in:
parent
359aac3799
commit
688c12c727
1 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,13 @@ class Spidermonkey <Formula
|
|||
|
||||
def install
|
||||
ENV.j1
|
||||
|
||||
# Spidermonkey hardsets the CC and CCC environment variables to cc and g++
|
||||
# but homebrew uses compiler flags that aren't available in Apple's default cc (version 4.0.1)
|
||||
# instead use the compilers chosen by homebrew and set in the CC and CXX environment variables
|
||||
inreplace "src/config/Darwin.mk", 'CC = cc', "CC = #{ENV['CC']}"
|
||||
inreplace "src/config/Darwin.mk", 'CCC = g++', "CCC = #{ENV['CXX']}"
|
||||
|
||||
Dir.chdir "src" do
|
||||
system "make JS_DIST=#{HOMEBREW_PREFIX} JS_THREADSAFE=1 DEFINES=-DJS_C_STRINGS_ARE_UTF8 -f Makefile.ref"
|
||||
system "make JS_DIST=#{prefix} -f Makefile.ref export"
|
||||
|
|
Loading…
Reference in a new issue