diff --git a/submodules/binaries/libvpx-armv7.a b/submodules/binaries/libvpx-armv7.a new file mode 100644 index 000000000..888bdc235 Binary files /dev/null and b/submodules/binaries/libvpx-armv7.a differ diff --git a/submodules/binaries/libvpx-armv7s.a b/submodules/binaries/libvpx-armv7s.a new file mode 100644 index 000000000..c36d5f299 Binary files /dev/null and b/submodules/binaries/libvpx-armv7s.a differ diff --git a/submodules/binaries/libvpx-i386.a b/submodules/binaries/libvpx-i386.a new file mode 100644 index 000000000..6d8042248 Binary files /dev/null and b/submodules/binaries/libvpx-i386.a differ diff --git a/submodules/binaries/why.txt b/submodules/binaries/why.txt new file mode 100644 index 000000000..0c656228c --- /dev/null +++ b/submodules/binaries/why.txt @@ -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 + diff --git a/submodules/build/builders.d/libvpx.mk b/submodules/build/builders.d/libvpx.mk index 90c4681d4..83891028b 100644 --- a/submodules/build/builders.d/libvpx.mk +++ b/submodules/build/builders.d/libvpx.mk @@ -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