diff mbox series

[1/1] package/x265: fix armv6 cross compilation issue

Message ID 20221127081232.2160208-1-davidb@230ruedubac.fr
State New
Headers show
Series [1/1] package/x265: fix armv6 cross compilation issue | expand

Commit Message

David Barbion Nov. 27, 2022, 8:12 a.m. UTC
When running a program that depends on x265, it crashes with the
message: illegal instruction

The package x265 was forcibly compiled with the gcc flag -mfpu=neon even
if the target CPU does not support the neon instruction set.
This fix adds the cmake flag CROSS_COMPILE_ARM to correctly set gcc flags
when compiling for ARMv6 architecture.

Signed-off-by: David Barbion <davidb@230ruedubac.fr>
---
 package/x265/x265.mk | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/package/x265/x265.mk b/package/x265/x265.mk
index 51c39df4cd..ada7f1e4eb 100644
--- a/package/x265/x265.mk
+++ b/package/x265/x265.mk
@@ -35,4 +35,8 @@  else
 X265_CONF_OPTS += -DENABLE_CLI=OFF
 endif
 
+ifeq ($(BR2_ARM_CPU_ARMV6),y)
+X265_CONF_OPTS += -DCROSS_COMPILE_ARM=1
+endif
+
 $(eval $(cmake-package))