Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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

* [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

* Re: [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, 0 replies; 5+ messages in thread
From: David Barbion @ 2022-11-27  8:13 UTC (permalink / raw)
  To: buildroot

Hello,

Sorry for disturbance, this patch makes compilaton on neon cpu fail.
I've pushed a new patch right now.

Le 26/11/2022 à 22:54, David Barbion a écrit :
> 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))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/x265: fix armv6 cross compilation issue
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-13  8:50 UTC (permalink / raw)
  To: David Barbion; +Cc: Bernd Kuhls, Thijs Vermeir, buildroot

Hello David,

On Sun, 27 Nov 2022 09:12:32 +0100
David Barbion <davidb@230ruedubac.fr> wrote:

> 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(+)

Sorry for the very, very long delay with which we are getting back to
you, and thanks for your investigation. Your patch was indeed fixing
the problem, but I took a step back and fixed a little more. See the
following two patches:

  https://gitlab.com/buildroot.org/buildroot/-/commit/9d62687d0024f7e3bac68157f1250970ef45abff
  https://gitlab.com/buildroot.org/buildroot/-/commit/1fbd26f83169a206bdf9c36c85510a33c0e7a864

Of course, if you're still working on your project, it would be great
to get a confirmation that those patches are still fixing the problem
for you.

Once again, thanks for your contribution!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/x265: fix armv6 cross compilation issue
  2024-07-13  8:50 ` Thomas Petazzoni via buildroot
@ 2024-08-09 19:28   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-08-09 19:28 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot
  Cc: Bernd Kuhls, David Barbion, Thijs Vermeir, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > Hello David,
 > On Sun, 27 Nov 2022 09:12:32 +0100
 > David Barbion <davidb@230ruedubac.fr> wrote:

 >> 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(+)

 > Sorry for the very, very long delay with which we are getting back to
 > you, and thanks for your investigation. Your patch was indeed fixing
 > the problem, but I took a step back and fixed a little more. See the
 > following two patches:

 >   https://gitlab.com/buildroot.org/buildroot/-/commit/9d62687d0024f7e3bac68157f1250970ef45abff
 >   https://gitlab.com/buildroot.org/buildroot/-/commit/1fbd26f83169a206bdf9c36c85510a33c0e7a864

 > Of course, if you're still working on your project, it would be great
 > to get a confirmation that those patches are still fixing the problem
 > for you.

 > Once again, thanks for your contribution!

Committed those two fixes to 2024.02.x and 2024.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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