[vlc-commits] contrib: soxr: fix SIGILL with old armv7 devices

Thomas Guillem git at videolan.org
Tue Apr 3 15:12:11 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Apr  3 15:12:04 2018 +0200| [cc032d20d71104bcd60de2c531c3a2ab6240d752] | committer: Thomas Guillem

contrib: soxr: fix SIGILL with old armv7 devices

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc032d20d71104bcd60de2c531c3a2ab6240d752
---

 ...ILL-when-doing-divisions-on-some-old-arch.patch | 29 ++++++++++++++++++++++
 contrib/src/soxr/rules.mak                         |  1 +
 2 files changed, 30 insertions(+)

diff --git a/contrib/src/soxr/0004-arm-fix-SIGILL-when-doing-divisions-on-some-old-arch.patch b/contrib/src/soxr/0004-arm-fix-SIGILL-when-doing-divisions-on-some-old-arch.patch
new file mode 100644
index 0000000000..9cf403de33
--- /dev/null
+++ b/contrib/src/soxr/0004-arm-fix-SIGILL-when-doing-divisions-on-some-old-arch.patch
@@ -0,0 +1,29 @@
+From f56b350d29813a58e14213383c922d38a94ac9c7 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas at gllm.fr>
+Date: Tue, 3 Apr 2018 14:55:06 +0200
+Subject: [PATCH 4/4] arm: fix SIGILL when doing divisions on some old archs
+
+The UDIV and SDIV instructions are optional on ARM. The "-mfpu=neon-vfpv4
+-mcpu=cortex-a7" CFLAGS made the compiler generate the udiv optional
+instruction instead of __armeabi_udiv().
+
+(Tested with the Android clang toolchain)
+---
+ cmake/Modules/FindSIMD32.cmake | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/cmake/Modules/FindSIMD32.cmake b/cmake/Modules/FindSIMD32.cmake
+index 9e42373..c70a6f7 100644
+--- a/cmake/Modules/FindSIMD32.cmake
++++ b/cmake/Modules/FindSIMD32.cmake
+@@ -12,7 +12,6 @@ if (DEFINED SIMD32_C_FLAGS)
+ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+   set (TRIAL_C_FLAGS
+     # Gcc
+-    "-mfpu=neon-vfpv4 -mcpu=cortex-a7"
+     "-mfpu=neon       -mfloat-abi=hard"
+     "-mfpu=neon       -mfloat-abi=softfp"
+     "-mfpu=neon       -mfloat-abi=soft"
+-- 
+2.11.0
+
diff --git a/contrib/src/soxr/rules.mak b/contrib/src/soxr/rules.mak
index 1175bc552f..2b43993427 100644
--- a/contrib/src/soxr/rules.mak
+++ b/contrib/src/soxr/rules.mak
@@ -19,6 +19,7 @@ soxr: soxr-$(SOXR_VERSION)-Source.tar.xz .sum-soxr
 	$(APPLY) $(SRC)/soxr/0001-always-generate-.pc.patch
 	$(APPLY) $(SRC)/soxr/0002-expose-Libs.private-in-.pc.patch
 	$(APPLY) $(SRC)/soxr/0003-add-aarch64-support.patch
+	$(APPLY) $(SRC)/soxr/0004-arm-fix-SIGILL-when-doing-divisions-on-some-old-arch.patch
 	$(APPLY) $(SRC)/soxr/find_ff_pkgconfig.patch
 	$(call pkg_static,"src/soxr.pc.in")
 	$(MOVE)



More information about the vlc-commits mailing list