freeswitch-stable: remove mod_v8

mod_v8 is too difficult to maintain and tricky to cross-compile. This
commit removes it.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2018-08-01 13:12:09 +02:00
parent c479fe35e4
commit 2ef37ad9fe
3 changed files with 0 additions and 209 deletions

View file

@ -45,29 +45,6 @@ config FS_STABLE_WITH_SRTP
help
Compile with SRTP support.
config FS_STABLE_WITH_V8
bool "Compile with V8 support"
depends on arm||i386||mipsel||x86_64
default y if x86_64
help
The sole purpose of this symbol is to prevent mod_v8 from being built
by the build bots. Currently the only exception is x86_64. The build is
time-consuming and the module is quite large, making it an unlikely
choice for devices with limited resources.
If you want mod_v8 to become available, select 'y'.
config FS_STABLE_WITH_V8_SNAPSHOT
bool "Include heap snapshot"
depends on FS_STABLE_WITH_V8
default n
help
V8 can be built with a heap snapshot for faster initialization. Default
is 'n' because of seemingly random segmentation faults observed when
generating the snapshot.
Only select 'y' if you know what you are doing.
config FS_STABLE_WITH_VPX
bool "Compile with VPx support"
depends on FS_STABLE_WITH_LIBYUV

View file

@ -203,7 +203,6 @@ FS_STABLE_MOD_AVAILABLE:= \
translate \
tts_commandline \
unimrcp \
v8 \
valet_parking \
verto \
vmd \
@ -226,7 +225,6 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_FS_STABLE_WITH_PGSQL \
CONFIG_FS_STABLE_WITH_PNG \
CONFIG_FS_STABLE_WITH_SRTP \
CONFIG_FS_STABLE_WITH_V8_SNAPSHOT \
CONFIG_FS_STABLE_WITH_VPX \
CONFIG_FS_STABLE_WITH_ZRTP \
CONFIG_LIBC \
@ -684,12 +682,6 @@ CONFIGURE_ARGS+= \
--with-erlang=no
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
CONFIGURE_ARGS+= \
--enable-static-v8 \
$(if $(CONFIG_FS_STABLE_WITH_V8_SNAPSHOT),,--disable-snapshot-v8)
endif
# Make mod_spandsp use fixed point math when soft float support is
# enabled on target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
@ -771,84 +763,6 @@ endif
MAKE_VARS+= \
ac_cv_dev_urandom=yes
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
# arm
ifeq ($(CONFIG_arm),y)
FS_STABLE_MYARCH:=arm
FS_STABLE_MYDEFINES:=v8_target_arch=arm
ifeq ($(CONFIG_arm_v6),y)
FS_STABLE_MYDEFINES+=arm_version=6
else
ifeq ($(CONFIG_arm_v7),y)
FS_STABLE_MYDEFINES+=arm_version=7
else
FS_STABLE_MYDEFINES+=arm_version=default
endif
endif
ifeq ($(CONFIG_VFP),y)
ifeq ($(CONFIG_VFPv3),y)
ifeq ($(CONFIG_NEON),y)
FS_STABLE_MYDEFINES+=arm_fpu=neon
else
FS_STABLE_MYDEFINES+=arm_fpu=vfpv3
endif
else
FS_STABLE_MYDEFINES+=arm_fpu=vfp
endif
else
FS_STABLE_MYDEFINES+=arm_fpu=default
endif
ifeq ($(CONFIG_SOFT_FLOAT),y)
FS_STABLE_MYDEFINES+=arm_float_abi=softfp
else
FS_STABLE_MYDEFINES+=arm_float_abi=hard
endif
endif
# i386
ifeq ($(CONFIG_i386),y)
FS_STABLE_MYARCH:=ia32
FS_STABLE_MYDEFINES:=v8_target_arch=ia32
endif
# mipsel
ifeq ($(CONFIG_mipsel),y)
FS_STABLE_MYARCH:=mipsel
FS_STABLE_MYDEFINES:=v8_target_arch=mipsel
ifeq ($(CONFIG_CPU_MIPS32),y)
ifeq ($(CONFIG_CPU_MIPS32_R2),y)
FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r2
else
ifeq ($(CONFIG_CPU_MIPS32_R1),y)
FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r1
endif
endif
endif
ifeq ($(CONFIG_SOFT_FLOAT),y)
FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=false
else
FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=true
endif
endif
# x86_64
ifeq ($(CONFIG_x86_64),y)
FS_STABLE_MYARCH:=x64
FS_STABLE_MYDEFINES:=v8_target_arch=x64
endif
MAKE_VARS+= \
FS_STABLE_HOSTCC="$(HOSTCC)" \
FS_STABLE_HOSTCXX="$(HOSTCXX)" \
FS_STABLE_HOST_CFLAGS="$(HOST_CFLAGS)" \
FS_STABLE_HOST_LDFLAGS="$(HOST_LDFLAGS)" \
FS_STABLE_HOST_PYTHONPATH="$(HOST_PYTHONPATH)" \
FS_STABLE_MYARCH="$(FS_STABLE_MYARCH)" \
FS_STABLE_MYDEFINES="$(FS_STABLE_MYDEFINES)"
endif
# Make sphinxbase use fixed point math when soft float support is
# enabled on target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
@ -879,10 +793,6 @@ FS_STABLE_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac697970
FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.6.tar.gz
FS_STABLE_FREERADIUS_CLIENT_HASH:=3fc609af328258e00345389d5478b099fe4ea3ad694d0472525ef3adab9cf053
# mod_v8
FS_STABLE_V8_FILE:=v8-3.24.14.tar.bz2
FS_STABLE_V8_HASH:=395f4eaf5580b973b1e33fe0aa27f8d013ddf1b163ad76992c50dd91ff182828
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
$(eval $(call Download/files,zmq,$(FS_STABLE_ZEROMQ_FILE),$(FS_STABLE_ZEROMQ_URL),$(FS_STABLE_ZEROMQ_HASH)))
endif
@ -897,10 +807,6 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
$(eval $(call Download/files,freeradius-client,$(FS_STABLE_FREERADIUS_CLIENT_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_FREERADIUS_CLIENT_HASH)))
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
$(eval $(call Download/files,v8,$(FS_STABLE_V8_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_V8_HASH)))
endif
# Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
# different apr/apr-util if found.
# FS_STABLE_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
@ -966,10 +872,6 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
$(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
$(CP) $(DL_DIR)/$(FS_STABLE_V8_FILE) $(PKG_BUILD_DIR)/libs
endif
# Compile FreeTDM first
ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM))
@ -1231,7 +1133,6 @@ $(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation
$(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
$(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
$(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
$(eval $(call Package/$(PKG_NAME)/Module,v8,V8,This package contains mod_v8 for FreeSWITCH.,@!USE_UCLIBCXX @FS_STABLE_WITH_V8 @arm||i386||mipsel||x86_64))
$(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
$(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
$(eval $(call Package/$(PKG_NAME)/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))

View file

@ -1,87 +0,0 @@
--- a/src/mod/languages/mod_v8/Makefile.am
+++ b/src/mod/languages/mod_v8/Makefile.am
@@ -15,12 +15,17 @@ V8_LIBEXT=dylib
V8_BUILDPARAMS=snapshot=off i18nsupport=off
V8_SNAPSHOT=nosnapshot
else
-V8_LIBDIR=$(V8_BUILDDIR)/out/native/lib.target
+V8_LIBDIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/lib.target
V8_LIBEXT=so
# Some gcc versions report warnings incorrectly
V8_BUILDPARAMS=strictaliasing=off werror=no i18nsupport=off
+if DISABLE_SNAPSHOT_V8
+V8_BUILDPARAMS+=snapshot=off
+V8_SNAPSHOT=nosnapshot
+else
V8_SNAPSHOT=snapshot
endif
+endif
if ENABLE_STATIC_V8
# Build the static lib version of V8
@@ -29,8 +34,8 @@ V8_STATIC_DIR=$(V8_BUILDDIR)/out/native
V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/native
V8_CXXFLAGS =
else
-V8_STATIC_DIR=$(V8_BUILDDIR)/out/native/obj.target/tools/gyp
-V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/native/obj.target/third_party/icu
+V8_STATIC_DIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/obj.target/tools/gyp
+V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/obj.target/third_party/icu
V8_CXXFLAGS = -fPIC
endif
V8LIB=$(V8_STATIC_DIR)/libv8_base*.a
@@ -46,11 +51,6 @@ else
V8_EXTRA_BUILD_PARAMS=--no-parallel
endif
-# Try to find the target platform for our configured CXX compiler
-# Parse the result one extra time to handle different i386 platforms (i386, i486 etc)
-CXX_TARGET_PLATFORM := $(shell $(CXX) -v 2>&1 | grep Target | cut '-d:' -f2 | cut '-d-' -f1 | tr -d ' ')
-CXX_TARGET_PLATFORM_I386 := $(shell echo "$(CXX_TARGET_PLATFORM)" | sed 's/^\(.\{1\}\)\(.\{1\}\)/\13/')
-
MODNAME=mod_v8
AM_CFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include -I$(V8_DIR)/include
@@ -121,21 +121,13 @@ $(V8_DIR)/.stamp-patch: $(V8_DIR)
$(V8LIB): $(V8_DIR) $(V8_DIR)/.stamp-patch
mkdir -p $(V8_BUILDDIR)
- if test "$(CXX_TARGET_PLATFORM)" = "x86_64"; then \
- defines="v8_target_arch=x64 target_arch=x64"; \
- else \
- if test "$(CXX_TARGET_PLATFORM)" = "arm"; then \
- defines="v8_target_arch=arm target_arch=arm"; \
- else \
- if test "$(CXX_TARGET_PLATFORM_I386)" = "i386"; then \
- defines="v8_target_arch=ia32 target_arch=ia32"; \
- fi; \
- fi; \
- fi; \
- cd $(V8_BUILDDIR) && CFLAGS="$(V8_CXXFLAGS)" CXXFLAGS="$(V8_CXXFLAGS)" \
- LINK=@CXX@ CXX=@CXX@ GYPFLAGS="$(V8_EXTRA_BUILD_PARAMS)" GYP_DEFINES="$$defines" \
- OUTDIR=$(V8_BUILDDIR)/out \
- PYTHONPATH="$(V8_DIR)/build/gyp/pylib:$(PYTHONPATH)" $(MAKE) -C $(V8_DIR) $(V8_BUILDPARAMS) native
+ cd $(V8_BUILDDIR) && sed -i "/'want_separate_host_toolset': 0,/s/0/1/" build/standalone.gypi && \
+ $(DEFAULT_VARS) CFLAGS+="$(V8_CXXFLAGS)" CXXFLAGS+="$(V8_CXXFLAGS)" \
+ LINK=@CXX@ CXX=@CXX@ GYPFLAGS="$(V8_EXTRA_BUILD_PARAMS)" OUTDIR=./out/ \
+ PYTHONPATH="$(V8_DIR)/build/gyp/pylib:$(FS_STABLE_HOST_PYTHONPATH)" $(MAKE) -C $(V8_DIR) \
+ CC.host="$(FS_STABLE_HOSTCC)" CFLAGS.host="$(FS_STABLE_HOST_CFLAGS)" CXX.host="$(FS_STABLE_HOSTCXX)" \
+ CXXFLAGS.host="$(FS_STABLE_HOST_CFLAGS)" LDFLAGS.host="$(FS_STABLE_HOST_LDFLAGS)" \
+ $(V8_BUILDPARAMS) $(FS_STABLE_MYDEFINES) $(FS_STABLE_MYARCH).release
if ENABLE_STATIC_V8
install-exec-local: $(V8LIB)
--- a/configure.ac
+++ b/configure.ac
@@ -1519,6 +1519,11 @@ AC_ARG_ENABLE(parallel-build-v8,
[AS_HELP_STRING([--disable-parallel-build-v8], [Disable parallel build of V8])], [enable_parallel_build_v8="$enableval"], [enable_parallel_build_v8="yes"])
AM_CONDITIONAL([ENABLE_PARALLEL_BUILD_V8],[test "x$enable_parallel_build_v8" != "xno"])
+# Option to force heap snapshot generation of Google's V8 to off
+AC_ARG_ENABLE(snapshot-v8,
+[AS_HELP_STRING([--disable-snapshot-v8], [Disable heap snapshot generation of V8])], [enable_snapshot_v8="$enableval"], [enable_snapshot_v8="yes"])
+AM_CONDITIONAL([DISABLE_SNAPSHOT_V8],[test "x$enable_snapshot_v8" != "xyes"])
+
AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"])
AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"])