mod_v8: Removed i18n support (ECMAScript 402) from V8 for now, to make build work on ARM platform. This will also force a rebuild of V8

This commit is contained in:
Peter Olsson 2014-01-23 23:46:06 +01:00
parent d2ba4c60c5
commit 04f7e7c025
2 changed files with 33 additions and 14 deletions

View File

@ -501,7 +501,6 @@ PLATFORM_CORE_LIBS=
# tweak platform specific flags # tweak platform specific flags
case "$host" in case "$host" in
*darwin12.*|*darwin11.*) *darwin12.*|*darwin11.*)
is_macosx=yes
APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX) APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp -Wno-deprecated-declarations) APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp -Wno-deprecated-declarations)
APR_ADDTO(LDFLAGS, -pipe -bind_at_load) APR_ADDTO(LDFLAGS, -pipe -bind_at_load)
@ -513,7 +512,6 @@ case "$host" in
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl]) APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
;; ;;
*darwin10.*) *darwin10.*)
is_macosx=yes
APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX) APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp) APR_ADDTO(CFLAGS, -pipe -no-cpp-precomp)
APR_ADDTO(LDFLAGS, -pipe -bind_at_load) APR_ADDTO(LDFLAGS, -pipe -bind_at_load)
@ -525,7 +523,6 @@ case "$host" in
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl]) APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
;; ;;
*darwin*) *darwin*)
is_macosx=yes
APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX) APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC) APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
if test "x$enable_core_odbc_support" != "xno"; then if test "x$enable_core_odbc_support" != "xno"; then
@ -548,8 +545,6 @@ case "$host" in
;; ;;
esac esac
AM_CONDITIONAL([PLATFORM_MACOSX],[test "x$is_macosx" == "xyes"])
APR_REMOVEFROM(SWITCH_AM_CXXFLAGS, -std=c99) APR_REMOVEFROM(SWITCH_AM_CXXFLAGS, -std=c99)
AC_SUBST(SWITCH_AM_CFLAGS) AC_SUBST(SWITCH_AM_CFLAGS)

View File

@ -8,23 +8,23 @@ V8=v8-3.24.14
V8_DIR=$(switch_srcdir)/libs/$(V8) V8_DIR=$(switch_srcdir)/libs/$(V8)
V8_BUILDDIR=$(switch_builddir)/libs/$(V8) V8_BUILDDIR=$(switch_builddir)/libs/$(V8)
if PLATFORM_MACOSX if ISMAC
V8_LIBDIR=$(V8_DIR)/out/native V8_LIBDIR=$(V8_DIR)/out/native
V8_LIBEXT=dylib V8_LIBEXT=dylib
# Build with snapshot doesn't work for OSX right now # Build with snapshot doesn't work for OSX right now
V8_BUILDPARAMS=snapshot=off V8_BUILDPARAMS=snapshot=off i18nsupport=off
V8_SNAPSHOT=nosnapshot V8_SNAPSHOT=nosnapshot
else else
V8_LIBDIR=$(V8_DIR)/out/native/lib.target V8_LIBDIR=$(V8_DIR)/out/native/lib.target
V8_LIBEXT=so V8_LIBEXT=so
# Some gcc versions report warnings incorrectly # Some gcc versions report warnings incorrectly
V8_BUILDPARAMS=strictaliasing=off werror=no V8_BUILDPARAMS=strictaliasing=off werror=no i18nsupport=off
V8_SNAPSHOT=snapshot V8_SNAPSHOT=snapshot
endif endif
if ENABLE_STATIC_V8 if ENABLE_STATIC_V8
# Build the static lib version of V8 # Build the static lib version of V8
if PLATFORM_MACOSX if ISMAC
V8_STATIC_DIR=$(V8_DIR)/out/native V8_STATIC_DIR=$(V8_DIR)/out/native
V8_ICU_STATIC_DIR=$(V8_DIR)/out/native V8_ICU_STATIC_DIR=$(V8_DIR)/out/native
V8_CXXFLAGS = V8_CXXFLAGS =
@ -57,9 +57,9 @@ AM_LDFLAGS += -avoid-version -module -no-undefined -shared
if ENABLE_STATIC_V8 if ENABLE_STATIC_V8
AM_LIBADD = $(switch_builddir)/libfreeswitch.la AM_LIBADD = $(switch_builddir)/libfreeswitch.la
V8_LDFLAGS = $(V8_STATIC_DIR)/libv8_{base*,$(V8_SNAPSHOT)*}.a $(V8_ICU_STATIC_DIR)/libicu{i18n,uc,data}.a $(SOLINK) V8_LDFLAGS = $(V8_STATIC_DIR)/libv8_{base*,$(V8_SNAPSHOT)*}.a $(SOLINK) #$(V8_ICU_STATIC_DIR)/libicu{i18n,uc,data}.a $(SOLINK)
else else
AM_LIBADD = $(switch_builddir)/libfreeswitch.la -lv8 -licuuc -licui18n AM_LIBADD = $(switch_builddir)/libfreeswitch.la -lv8 #-licuuc -licui18n
AM_LDFLAGS += -L$(V8_LIBDIR) AM_LDFLAGS += -L$(V8_LIBDIR)
endif endif
@ -72,7 +72,26 @@ AM_LDFLAGS += -DHAVE_ODBC
endif endif
mod_LTLIBRARIES = mod_v8.la mod_LTLIBRARIES = mod_v8.la
mod_v8_la_SOURCES = mod_v8.cpp src/fscoredb.cpp src/fscurl.cpp src/fsdtmf.cpp src/fsevent.cpp src/fsfileio.cpp src/fsglobal.cpp src/fsodbc.cpp src/fspcre.cpp src/fsrequest.cpp src/fssession.cpp src/fssocket.cpp src/fsteletone.cpp src/fsxml.cpp src/fsfile.cpp src/jsbase.cpp src/jsmain.cpp
mod_v8_la_SOURCES = \
mod_v8.cpp \
src/jsmain.cpp \
src/jsbase.cpp \
src/fscoredb.cpp \
src/fscurl.cpp \
src/fsdtmf.cpp \
src/fsevent.cpp \
src/fsfileio.cpp \
src/fsglobal.cpp \
src/fsodbc.cpp \
src/fspcre.cpp \
src/fsrequest.cpp \
src/fssession.cpp \
src/fssocket.cpp \
src/fsteletone.cpp \
src/fsxml.cpp \
src/fsfile.cpp
mod_v8_la_CFLAGS = $(AM_CFLAGS) $(LIBCURL_CPPFLAGS) -I$(switch_srcdir)/libs/libteletone/src mod_v8_la_CFLAGS = $(AM_CFLAGS) $(LIBCURL_CPPFLAGS) -I$(switch_srcdir)/libs/libteletone/src
mod_v8_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBCURL_CPPFLAGS) -I$(switch_srcdir)/libs/libteletone/src mod_v8_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBCURL_CPPFLAGS) -I$(switch_srcdir)/libs/libteletone/src
mod_v8_la_LIBADD = $(AM_LIBADD) mod_v8_la_LIBADD = $(AM_LIBADD)
@ -90,7 +109,12 @@ $(SOURCES): $(BUILT_SOURCES)
$(V8_DIR): $(V8_DIR):
$(GETLIB) $(V8).tar.bz2 $(GETLIB) $(V8).tar.bz2
$(V8LIB): $(V8_DIR) # This target is just to force V8 to rebuild without I18N support, if it was built already
$(V8_DIR)/.forcedrebuild:
cd $(V8_BUILDDIR) && $(MAKE) clean
touch $(V8_DIR)/.forcedrebuild
$(V8LIB): $(V8_DIR) $(V8_DIR)/.forcedrebuild
if test "$(CXX_TARGET_PLATFORM)" = "x86_64"; then \ if test "$(CXX_TARGET_PLATFORM)" = "x86_64"; then \
defines="v8_target_arch=x64 target_arch=x64"; \ defines="v8_target_arch=x64 target_arch=x64"; \
else \ else \
@ -112,7 +136,7 @@ if ENABLE_STATIC_V8
install-exec-local: $(V8LIB) install-exec-local: $(V8LIB)
else else
# This is a temporary solution to force Mac OSX build to load the libraries at the right place # This is a temporary solution to force Mac OSX build to load the libraries at the right place
if PLATFORM_MACOSX if ISMAC
install-exec-local: $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT) install-exec-local: $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT)
install_name_tool -change /usr/local/lib/libv8.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT) .libs/mod_v8.so install_name_tool -change /usr/local/lib/libv8.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libv8.$(V8_LIBEXT) .libs/mod_v8.so
install_name_tool -change /usr/local/lib/libicuuc.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libicuuc.$(V8_LIBEXT) .libs/mod_v8.so install_name_tool -change /usr/local/lib/libicuuc.$(V8_LIBEXT) $(DESTDIR)$(libdir)/libicuuc.$(V8_LIBEXT) .libs/mod_v8.so