Use binary distribution for libvpx, since the new Apple compiler (Xcode 5.1) outputs crashing code.

This commit is contained in:
Guillaume BIENKOWSKI 2014-03-28 14:12:07 +01:00
parent c4d5d70316
commit 29cca9bfe9
5 changed files with 29 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,16 @@
Notes:
This directory is here because some of our dependencies compile incorrecly
(or not at all) with the compilers that Apple ships with its newer Xcode versions.
You'll find here the reasons why certain libs are furnished pre-compiled.
= Libvpx =
Binary version compiled with XCode 5.0, with the patch suggested here for
garbage video fix: https://code.google.com/p/webm/issues/detail?id=603#c45
Compiles OK on XCode 5.1 but results in a crash in-app.
Bug is here: https://code.google.com/p/webm/issues/detail?id=737

View file

@ -1,25 +1,31 @@
libvpx_dir?=externals/libvpx
libvpx_configure_options=\
--enable-static --disable-shared \
--enable-error-concealment --disable-examples \
--enable-realtime-only --enable-spatial-resampling \
--enable-vp8 --enable-multithread --disable-vp9
take_binary=
ifneq (,$(findstring armv6,$(host)))
libvpx_configure_options+= --target=armv6-darwin-gcc --cpu=arm1176jzf-s
else ifneq (,$(findstring armv7s,$(host)))
libvpx_configure_options+= --target=armv7s-darwin-gcc
take_binary = armv7s
else ifneq (,$(findstring armv7,$(host)))
libvpx_configure_options+= --target=armv7-darwin-gcc
take_binary = armv7
else
libvpx_configure_options+= --target=x86-darwin10-gcc
endif
libvpx_dir?=externals/libvpx
all_p=armv6-darwin-gcc #neon Cortex-A8
all_p+=armv7-darwin-gcc #neon Cortex-A8
all_p+=armv7s-darwin-gcc #neon Cortex-A8
$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp:
cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \
@ -30,12 +36,17 @@ $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/p
mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir)
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
&& export all_platforms="${all_p}" && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) --sdk-path=$$SDK_BIN_PATH/../../ --libc=$$SYSROOT_PATH $(libvpx_configure_options) --extra-cflags="-fno-strict-aliasing"
&& export all_platforms="${all_p}" && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) --sdk-path=$$SDK_BIN_PATH/../../ --libc=$$SYSROOT_PATH $(libvpx_configure_options) --extra-cflags="-O1 -fno-strict-aliasing"
build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) \
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
ifneq (,$(take_binary))
# we have to take binary version of libvpx for ARM because Clang introduces bugs in optimized assembly
@echo "\033[01;32m Getting BINARY version of libvpx for $(take_binary) \033[0m"
cp $(BUILDER_SRC_DIR)/binaries/libvpx-$(take_binary).a $(prefix)/lib/libvpx.a
endif
clean-libvpx:
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && make clean