Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/ffmpeg: Fix build for mips
@ 2021-06-06  7:28 Bernd Kuhls
  2021-06-06  7:54 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2021-06-06  7:28 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/079/079df777211933b92ac5a67fc175839c8188850f/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: updated patch following upstream review

 .../0003-libavutil-Fix-mips-build.patch       | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 package/ffmpeg/0003-libavutil-Fix-mips-build.patch

diff --git a/package/ffmpeg/0003-libavutil-Fix-mips-build.patch b/package/ffmpeg/0003-libavutil-Fix-mips-build.patch
new file mode 100644
index 0000000000..7af01463e8
--- /dev/null
+++ b/package/ffmpeg/0003-libavutil-Fix-mips-build.patch
@@ -0,0 +1,72 @@
+From 6e8daf0d502a2a822f1f08f42368d7d676dc1a9e Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Sun, 6 Jun 2021 08:54:53 +0200
+Subject: [PATCH] libavutil: Fix mips build
+
+Check for sys/auxv.h because not all toolchains contain this header.
+
+Fixes https://trac.ffmpeg.org/ticket/9138
+
+Patch sent upstream:
+http://ffmpeg.org/pipermail/ffmpeg-devel/2021-June/281037.html
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure            | 2 ++
+ libavutil/mips/cpu.c | 6 +++---
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure b/configure
+index 82367fd30d..b0154cb8b2 100755
+--- a/configure
++++ b/configure
+@@ -2161,6 +2161,7 @@ HEADERS_LIST="
+     opencv2_core_core_c_h
+     OpenGL_gl3_h
+     poll_h
++    sys_auxv_h
+     sys_param_h
+     sys_resource_h
+     sys_select_h
+@@ -6210,6 +6211,7 @@ check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepa
+ check_headers windows.h
+ check_headers X11/extensions/XvMClib.h
+ check_headers asm/types.h
++check_headers sys/auxv.h
+ 
+ # it seems there are versions of clang in some distros that try to use the
+ # gcc headers, which explodes for stdatomic
+diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c
+index 59619d54de..4738104cdd 100644
+--- a/libavutil/mips/cpu.c
++++ b/libavutil/mips/cpu.c
+@@ -19,7 +19,7 @@
+ #include "libavutil/cpu.h"
+ #include "libavutil/cpu_internal.h"
+ #include "config.h"
+-#if defined __linux__ || defined __ANDROID__
++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -28,7 +28,7 @@
+ #include "libavutil/avstring.h"
+ #endif
+ 
+-#if defined __linux__ || defined __ANDROID__
++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
+ 
+ #define HWCAP_LOONGSON_CPUCFG (1 << 14)
+ 
+@@ -105,7 +105,7 @@ static int cpu_flags_cpuinfo(void)
+ 
+ int ff_get_cpu_flags_mips(void)
+ {
+-#if defined __linux__ || defined __ANDROID__
++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
+     if (cpucfg_available())
+         return cpu_flags_cpucfg();
+     else
+-- 
+2.29.2
+
-- 
2.29.2

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

* [Buildroot] [PATCH v2 1/1] package/ffmpeg: Fix build for mips
  2021-06-06  7:28 [Buildroot] [PATCH v2 1/1] package/ffmpeg: Fix build for mips Bernd Kuhls
@ 2021-06-06  7:54 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-06-06  7:54 UTC (permalink / raw)
  To: buildroot

Bernd, All,

On 2021-06-06 09:28 +0200, Bernd Kuhls spake thusly:
> Fixes:
> http://autobuild.buildroot.net/results/079/079df777211933b92ac5a67fc175839c8188850f/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> v2: updated patch following upstream review
> 
>  .../0003-libavutil-Fix-mips-build.patch       | 72 +++++++++++++++++++
>  1 file changed, 72 insertions(+)
>  create mode 100644 package/ffmpeg/0003-libavutil-Fix-mips-build.patch
> 
> diff --git a/package/ffmpeg/0003-libavutil-Fix-mips-build.patch b/package/ffmpeg/0003-libavutil-Fix-mips-build.patch
> new file mode 100644
> index 0000000000..7af01463e8
> --- /dev/null
> +++ b/package/ffmpeg/0003-libavutil-Fix-mips-build.patch
> @@ -0,0 +1,72 @@
> +From 6e8daf0d502a2a822f1f08f42368d7d676dc1a9e Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd.kuhls@t-online.de>
> +Date: Sun, 6 Jun 2021 08:54:53 +0200
> +Subject: [PATCH] libavutil: Fix mips build
> +
> +Check for sys/auxv.h because not all toolchains contain this header.
> +
> +Fixes https://trac.ffmpeg.org/ticket/9138
> +
> +Patch sent upstream:
> +http://ffmpeg.org/pipermail/ffmpeg-devel/2021-June/281037.html
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + configure            | 2 ++
> + libavutil/mips/cpu.c | 6 +++---
> + 2 files changed, 5 insertions(+), 3 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 82367fd30d..b0154cb8b2 100755
> +--- a/configure
> ++++ b/configure
> +@@ -2161,6 +2161,7 @@ HEADERS_LIST="
> +     opencv2_core_core_c_h
> +     OpenGL_gl3_h
> +     poll_h
> ++    sys_auxv_h
> +     sys_param_h
> +     sys_resource_h
> +     sys_select_h
> +@@ -6210,6 +6211,7 @@ check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepa
> + check_headers windows.h
> + check_headers X11/extensions/XvMClib.h
> + check_headers asm/types.h
> ++check_headers sys/auxv.h
> + 
> + # it seems there are versions of clang in some distros that try to use the
> + # gcc headers, which explodes for stdatomic
> +diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c
> +index 59619d54de..4738104cdd 100644
> +--- a/libavutil/mips/cpu.c
> ++++ b/libavutil/mips/cpu.c
> +@@ -19,7 +19,7 @@
> + #include "libavutil/cpu.h"
> + #include "libavutil/cpu_internal.h"
> + #include "config.h"
> +-#if defined __linux__ || defined __ANDROID__
> ++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
> + #include <stdint.h>
> + #include <stdio.h>
> + #include <string.h>
> +@@ -28,7 +28,7 @@
> + #include "libavutil/avstring.h"
> + #endif
> + 
> +-#if defined __linux__ || defined __ANDROID__
> ++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
> + 
> + #define HWCAP_LOONGSON_CPUCFG (1 << 14)
> + 
> +@@ -105,7 +105,7 @@ static int cpu_flags_cpuinfo(void)
> + 
> + int ff_get_cpu_flags_mips(void)
> + {
> +-#if defined __linux__ || defined __ANDROID__
> ++#if (defined __linux__ || defined __ANDROID__) && defined(HAVE_SYS_AUXV_H)
> +     if (cpucfg_available())
> +         return cpu_flags_cpucfg();
> +     else
> +-- 
> +2.29.2
> +
> -- 
> 2.29.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/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.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2021-06-06  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-06  7:28 [Buildroot] [PATCH v2 1/1] package/ffmpeg: Fix build for mips Bernd Kuhls
2021-06-06  7:54 ` Yann E. MORIN

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