initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
Make SoX support uclibc-based toolchains, from:
http://sourceforge.net/p/sox/bugs/179/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Index: sox-14.4.1/src/formats.c
===================================================================
--- sox-14.4.1.orig/src/formats.c
+++ sox-14.4.1/src/formats.c
@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp
#if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
fp->_p -= PIPE_AUTO_DETECT_SIZE;
fp->_r += PIPE_AUTO_DETECT_SIZE;
-#elif defined __GLIBC__
+#elif defined __GLIBC__ && ! defined __UCLIBC__
fp->_IO_read_ptr = fp->_IO_read_base;
#elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
fp->_ptr = fp->_base;
@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp
/* To fix this #error, either simply remove the #error line and live without
* file-type detection with pipes, or add support for your compiler in the
* lines above. Test with cat monkey.wav | ./sox --info - */
- #error FIX NEEDED HERE
#define NO_REWIND_PIPE
(void)fp;
#endif
@@ -0,0 +1,45 @@
From 18ace560a15207503805d4df25b90c7a756bcbf6 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 2 Feb 2021 23:53:39 +0100
Subject: [PATCH] configure.ac: put back --disable-stack-protector
Put back --disable-stack-protector which has been removed by commit
70c85915eace83142b84e4f65f5db421cf0c09e3. This will allow the user to
disable it or to let a higher buildsystem such as buildroot to finely
configure it.
Indeed, without this patch, build can fail as some compilers (such as
uclibc) could missed the needed library (-lssp or -lssp_nonshared) at
linking step:
CCLD libsox.la
/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp_nonshared
/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://sourceforge.net/p/sox/patches/122/]
---
configure.ac | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 39306398..a1665467 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,12 @@ AC_PROG_LN_S
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
-AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
+AC_ARG_ENABLE([stack-protector],
+ AS_HELP_STRING([--disable-stack-protector], [Disable -fstack-protector-strong]),
+ [enable_stack_protector=$enableval], [enable_stack_protector=yes])
+AS_IF([test x"$enable_stack_protector" = "xyes"],
+ [AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])])
+
AX_APPEND_COMPILE_FLAGS([-Wall -Wmissing-prototypes -Wstrict-prototypes])
AX_APPEND_LINK_FLAGS([-Wl,--as-needed])
--
2.29.2
@@ -0,0 +1,47 @@
From 8df3a56cfb104c84d4701562ae2e3c9dc4686798 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 6 Feb 2021 11:08:45 +0100
Subject: [PATCH] configure.ac: fix static linking with id3tag
Put back -lz (i.e. ZLIB_LIBS) when searching for id3tag which was
wrongly removed by commit 6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This
will fix the following static build failure:
configure:15290: checking for id3_file_open in -lid3tag
configure:15315: /home/buildroot/autobuild/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lid3tag >&5
conftest.c:60:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
60 | char id3_file_open ();
| ^~~~
conftest.c:62:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
62 | main ()
| ^~~~
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_compress':
util.c:(.text+0x1ac): undefined reference to `compress2'
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_decompress':
util.c:(.text+0x240): undefined reference to `uncompress'
Fixes:
- http://autobuild.buildroot.org/results/73efdacf237e3d567fa66f3b3f68e624f5e35bc7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://sourceforge.net/p/sox/patches/123]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 39306398..896714f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Various libraries
SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open])
SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress])
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
-SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open])
+SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS])
SOX_WITH_LIB([libgsm], [gsm/gsm.h gsm.h], [gsm], [gsm_create])
dnl Optional formats
--
2.29.2
@@ -0,0 +1,48 @@
From 4630e574e6c0269b94fd910e7c72b8ad1ee62ce7 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 3 Mar 2021 16:48:57 +0100
Subject: [PATCH] configure.ac: fix static linking with magic
Use SOX_FMT_PKG to retrieve magic dependencies (e.g. bzip2 or zlib)
indeed -lz (i.e. ZLIB_LIBS) was wrongly removed by commit
6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This will fix the following
static build failure:
configure:11677: checking for magic_open in -lmagic
configure:11702: /srv/storage/autobuild/run/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lmagic >&5
conftest.c:53:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
53 | char magic_open ();
| ^~~~
conftest.c:55:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
55 | main ()
| ^~~~
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /srv/storage/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmagic.a(compress.o): in function `uncompresszlib':
compress.c:(.text+0x1d0): undefined reference to `inflateInit_'
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1e4): undefined reference to `inflate'
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1fc): undefined reference to `inflateEnd'
Fixes:
- http://autobuild.buildroot.org/results/d96f27cd96926060046e2e1115777f5bceda3741
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: not sent yet (waiting for feedback on third patch)]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 896714f5..8ae3202c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,7 @@ SOX_REPORT([other], [LADSPA effect plugins], [$HAVE_LADSPA])
dnl Various libraries
-SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open])
+SOX_FMT_PKG([magic], [libmagic])
SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress])
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS])
--
2.30.1
@@ -0,0 +1,44 @@
From 06109c84ab6930265287049c4bf9405e7ebc4986 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 4 Aug 2021 10:27:16 +0200
Subject: [PATCH] configure.ac: fix static linking with sndfile
Use SOX_FMT_PKG to retrieve sndfile dependencies (e.g. flac, opus or
vorbis). This will fix the following static build failure:
configure:14720: checking for sf_open_virtual in -lsndfile
configure:14745: /tmp/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -Os -g0 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lsndfile >&5
conftest.c:73:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
73 | char sf_open_virtual ();
| ^~~~
conftest.c:75:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
75 | main ()
| ^~~~
/tmp/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /tmp/instance-1/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libsndfile.a(libsndfile_la-flac.o): in function `flac_byterate':
flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusString'
Fixes:
- http://autobuild.buildroot.org/results/4bc58ed68b29642876bb02710d0cd4f31540de86
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: not sent yet (waiting for feedback on third patch)]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 8ae3202c..26510769 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,7 +117,7 @@ SOX_FMT_REQ([mp3], [MAD LAME TWOLAME])
SOX_FMT_PKG([oggvorbis], [ogg vorbis vorbisenc vorbisfile])
SOX_FMT_PKG([opus], [opusfile])
-SOX_DL_LIB([libsndfile], [sndfile.h], [sndfile], [sf_open_virtual])
+SOX_FMT_PKG([libsndfile], [sndfile])
SOX_FMT_REQ([sndfile], [LIBSNDFILE])
SOX_FMT_LIB([wavpack], [wavpack/wavpack.h], [wavpack], [WavpackGetSampleRate])
--
2.30.2
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_SOX
bool "sox"
help
SoX is a cross-platform (Windows, Linux, MacOS X, etc.)
command line utility that can convert various formats of
computer audio files into other formats.
It can also apply various effects to these sound files, and,
as an added bonus, SoX can play and record audio files on
most platforms.
http://sox.sourceforge.net/
+4
View File
@@ -0,0 +1,4 @@
# Locally computed
sha256 3d06ba8fc39ac92f16da73593be48afe0a704fe4dc4f6eca2e5137ef77cd5115 sox-7524160b29a476f7e87bc14fddf12d349f9a3c5e-br1.tar.gz
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a LICENSE.LGPL
+141
View File
@@ -0,0 +1,141 @@
################################################################################
#
# sox
#
################################################################################
SOX_VERSION = 7524160b29a476f7e87bc14fddf12d349f9a3c5e
SOX_SITE = git://git.code.sf.net/p/sox/code
SOX_SITE_METHOD = git
SOX_DEPENDENCIES = host-autoconf-archive host-pkgconf
SOX_LICENSE = GPL-2.0+ (sox binary), LGPL-2.1+ (libraries)
SOX_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL
SOX_CPE_ID_VENDOR = sound_exchange_project
SOX_CPE_ID_PRODUCT = sound_exchange
# From git and we're patching configure.ac
SOX_AUTORECONF = YES
SOX_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
SOX_INSTALL_STAGING = YES
SOX_IGNORE_CVES += CVE-2017-11332 CVE-2017-11358 CVE-2017-11359 \
CVE-2017-15370 CVE-2017-15371 CVE-2017-15372 CVE-2017-15642 \
CVE-2017-18189 CVE-2019-8354 CVE-2019-8355 CVE-2019-8356 \
CVE-2019-8357 CVE-2019-13590
SOX_CONF_OPTS = \
--with-distro="Buildroot" \
--disable-stack-protector
ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
SOX_DEPENDENCIES += alsa-lib
SOX_CONF_OPTS += --enable-alsa
else
SOX_CONF_OPTS += --disable-alsa
endif
ifeq ($(BR2_PACKAGE_FILE),y)
SOX_DEPENDENCIES += file
SOX_CONF_OPTS += --enable-magic
else
SOX_CONF_OPTS += --disable-magic
endif
ifeq ($(BR2_PACKAGE_FLAC),y)
SOX_DEPENDENCIES += flac
SOX_CONF_OPTS += --enable-flac
else
SOX_CONF_OPTS += --disable-flac
endif
ifeq ($(BR2_PACKAGE_LAME),y)
SOX_DEPENDENCIES += lame
SOX_CONF_OPTS += --with-lame
else
SOX_CONF_OPTS += --without-lame
endif
ifeq ($(BR2_PACKAGE_LIBAO),y)
SOX_DEPENDENCIES += libao
SOX_CONF_OPTS += --enable-ao
else
SOX_CONF_OPTS += --disable-ao
endif
ifeq ($(BR2_PACKAGE_LIBGSM),y)
SOX_DEPENDENCIES += libgsm
SOX_CONF_OPTS += --enable-gsm
else
SOX_CONF_OPTS += --disable-gsm
endif
ifeq ($(BR2_PACKAGE_LIBID3TAG),y)
SOX_DEPENDENCIES += libid3tag
SOX_CONF_OPTS += --with-id3tag
else
SOX_CONF_OPTS += --without-id3tag
endif
ifeq ($(BR2_PACKAGE_LIBMAD),y)
SOX_DEPENDENCIES += libmad
SOX_CONF_OPTS += --with-mad
else
SOX_CONF_OPTS += --without-mad
endif
ifeq ($(BR2_PACKAGE_LIBPNG),y)
SOX_DEPENDENCIES += libpng
SOX_CONF_OPTS += --with-png
else
SOX_CONF_OPTS += --without-png
endif
ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
SOX_DEPENDENCIES += libsndfile
SOX_CONF_OPTS += --enable-sndfile
else
SOX_CONF_OPTS += --disable-sndfile
endif
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
SOX_DEPENDENCIES += libvorbis
SOX_CONF_OPTS += --enable-oggvorbis
else
SOX_CONF_OPTS += --disable-oggvorbis
endif
ifeq ($(BR2_PACKAGE_OPENCORE_AMR),y)
SOX_DEPENDENCIES += opencore-amr
SOX_CONF_OPTS += --enable-amrwb --enable-amrnb
else
SOX_CONF_OPTS += --disable-amrwb --disable-amrnb
endif
ifeq ($(BR2_PACKAGE_OPUSFILE),y)
SOX_DEPENDENCIES += opusfile
SOX_CONF_OPTS += --enable-opus
else
SOX_CONF_OPTS += --disable-opus
endif
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
SOX_DEPENDENCIES += pulseaudio
SOX_CONF_OPTS += --enable-pulseaudio
else
SOX_CONF_OPTS += --disable-pulseaudio
endif
ifeq ($(BR2_PACKAGE_TWOLAME),y)
SOX_DEPENDENCIES += twolame
SOX_CONF_OPTS += --with-twolame
else
SOX_CONF_OPTS += --without-twolame
endif
ifeq ($(BR2_PACKAGE_WAVPACK),y)
SOX_DEPENDENCIES += wavpack
SOX_CONF_OPTS += --enable-wavpack
else
SOX_CONF_OPTS += --disable-wavpack
endif
$(eval $(autotools-package))