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

David Barbion davidb at 230ruedubac.fr
Sat Nov 26 21:54:36 UTC 2022


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 ARM architecture.

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

diff --git a/package/x265/x265.mk b/package/x265/x265.mk
index 51c39df4cd..e3a4acc6e5 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)$(BR2_aarch64),y)
+X265_CONF_OPTS += -DCROSS_COMPILE_ARM=1
+endif
+
 $(eval $(cmake-package))
-- 
2.38.1



More information about the buildroot mailing list