All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian
@ 2022-08-23 21:22 Fabrice Fontaine
  2022-08-27 20:28 ` Yann E. MORIN
  2022-09-17 18:51 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-08-23 21:22 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Mahyar Koshkouei, Fabrice Fontaine

Fix the following build failure:

In file included from libavcodec/ppc/audiodsp.c:31:
libavcodec/ppc/audiodsp.c: In function 'scalarproduct_int16_altivec':
./libavutil/ppc/util_altivec.h:123:5: error: implicit declaration of function 'vec_vsx_ld'; did you mean 'vec_vslh'? [-Werror=implicit-function-declaration]
  123 |     vec_vsx_ld(offset, b)
      |     ^~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/b772d285f978ff9bc3b07872d009633c943f20b1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/ffmpeg/ffmpeg.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 82d229903f..7038f4f5f7 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -511,7 +511,9 @@ endif
 FFMPEG_CONF_OPTS += --disable-asm
 endif # MIPS
 
-ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC):$(BR2_powerpc64le),y:)
+FFMPEG_CONF_OPTS += --enable-altivec
+else ifeq ($(BR2_POWERPC_CPU_HAS_VSX):$(BR2_powerpc64le),y:y)
 FFMPEG_CONF_OPTS += --enable-altivec
 else
 FFMPEG_CONF_OPTS += --disable-altivec
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian
  2022-08-23 21:22 [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian Fabrice Fontaine
@ 2022-08-27 20:28 ` Yann E. MORIN
  2022-09-17 18:51 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-08-27 20:28 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, buildroot

On 2022-08-23 23:22 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure:
> 
> In file included from libavcodec/ppc/audiodsp.c:31:
> libavcodec/ppc/audiodsp.c: In function 'scalarproduct_int16_altivec':
> ./libavutil/ppc/util_altivec.h:123:5: error: implicit declaration of function 'vec_vsx_ld'; did you mean 'vec_vslh'? [-Werror=implicit-function-declaration]
>   123 |     vec_vsx_ld(offset, b)
>       |     ^~~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/b772d285f978ff9bc3b07872d009633c943f20b1
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/ffmpeg/ffmpeg.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
> index 82d229903f..7038f4f5f7 100644
> --- a/package/ffmpeg/ffmpeg.mk
> +++ b/package/ffmpeg/ffmpeg.mk
> @@ -511,7 +511,9 @@ endif
>  FFMPEG_CONF_OPTS += --disable-asm
>  endif # MIPS
>  
> -ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
> +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC):$(BR2_powerpc64le),y:)
> +FFMPEG_CONF_OPTS += --enable-altivec
> +else ifeq ($(BR2_POWERPC_CPU_HAS_VSX):$(BR2_powerpc64le),y:y)
>  FFMPEG_CONF_OPTS += --enable-altivec

So, this means you enable AltiVec when VSX support is available, which
is a bit confusing. VSX is indeed a further extension to AltiVec [0].

However, in ffpmpeg, VSX is driven by its own --enable-vsx flag to, so
not seeing it here is also a bit confusing.

So, I've added a cmment in the .mk and extended the commit log.

Applied to master, thanks.

[0] https://en.wikipedia.org/wiki/AltiVec#VSX_(Vector_Scalar_Extension)
This means that VSX implies AltiVec, but this is not accounted for in
arch/Config.in.powerpc, and maybe we would need something like:

    config BR2_POWERPC_CPU_HAS_VSX
        bool
        select BR2_POWERPC_CPU_HAS_ALTIVEC

Which would allow to simplify the entries for BR2_powerpc_power7 and
BR2_powerpc_power8, so they would just need to select BR2_POWERPC_CPU_HAS_VSX
But that is for a separate patch, of course...

Regards,
Yann E. MORIN.

>  else
>  FFMPEG_CONF_OPTS += --disable-altivec
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian
  2022-08-23 21:22 [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian Fabrice Fontaine
  2022-08-27 20:28 ` Yann E. MORIN
@ 2022-09-17 18:51 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-09-17 18:51 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure:
 > In file included from libavcodec/ppc/audiodsp.c:31:
 > libavcodec/ppc/audiodsp.c: In function 'scalarproduct_int16_altivec':
 > ./libavutil/ppc/util_altivec.h:123:5: error: implicit declaration of function 'vec_vsx_ld'; did you mean 'vec_vslh'? [-Werror=implicit-function-declaration]
 >   123 |     vec_vsx_ld(offset, b)
 >       |     ^~~~~~~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/b772d285f978ff9bc3b07872d009633c943f20b1

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.05.x and 2022.02.x, thanks.

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

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

end of thread, other threads:[~2022-09-17 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 21:22 [Buildroot] [PATCH 1/1] package/ffmpeg: altivec needs VSX with little endian Fabrice Fontaine
2022-08-27 20:28 ` Yann E. MORIN
2022-09-17 18:51 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.