Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/x265: fix armv6 cross compilation issue
@ 2022-11-27  8:12 David Barbion
  2024-07-13  8:50 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: David Barbion @ 2022-11-27  8:12 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, David Barbion, Thijs Vermeir

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 --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))
-- 
2.38.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/x265: fix armv6 cross compilation issue
@ 2022-11-26 21:54 David Barbion
  2022-11-27  8:13 ` David Barbion
  0 siblings, 1 reply; 5+ messages in thread
From: David Barbion @ 2022-11-26 21:54 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, David Barbion, Thijs Vermeir

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@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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-09 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-27  8:12 [Buildroot] [PATCH 1/1] package/x265: fix armv6 cross compilation issue David Barbion
2024-07-13  8:50 ` Thomas Petazzoni via buildroot
2024-08-09 19:28   ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2022-11-26 21:54 David Barbion
2022-11-27  8:13 ` David Barbion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox