[PATCH 1/1] package/musepack: fix build with gcc 10

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] package/musepack: fix build with gcc 10

Fabrice Fontaine
Fixes:
 - http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf

Signed-off-by: Fabrice Fontaine <[hidden email]>
---
 .../musepack/0005-fix-build-with-gcc-10.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/musepack/0005-fix-build-with-gcc-10.patch

diff --git a/package/musepack/0005-fix-build-with-gcc-10.patch b/package/musepack/0005-fix-build-with-gcc-10.patch
new file mode 100644
index 0000000000..012dbab542
--- /dev/null
+++ b/package/musepack/0005-fix-build-with-gcc-10.patch
@@ -0,0 +1,30 @@
+fix build with gcc 10
+
+Define __Cc, __Dc and Res_bit as extern to avoid the following build
+failure with gcc 10 (which defaults to -fno-common):
+
+/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x0): multiple definition of `__Dc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x430): first defined here
+/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x28): multiple definition of `__Cc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x458): first defined here
+/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x74): multiple definition of `Res_bit'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x4a4): first defined here
+
+Fixes:
+ - http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf
+
+Signed-off-by: Fabrice Fontaine <[hidden email]>
+
+diff -Naur musepack_src_r475.orig/libmpcdec/requant.h musepack_src_r475/libmpcdec/requant.h
+--- musepack_src_r475.orig/libmpcdec/requant.h 2020-09-10 08:31:50.696105246 +0200
++++ musepack_src_r475/libmpcdec/requant.h 2020-09-10 08:32:52.944106476 +0200
+@@ -47,9 +47,9 @@
+
+
+ /* C O N S T A N T S */
+-const mpc_uint8_t      Res_bit [18];     ///< Bits per sample for chosen quantizer
+-const MPC_SAMPLE_FORMAT __Cc    [1 + 18]; ///< Requantization coefficients
+-const mpc_int16_t       __Dc    [1 + 18]; ///< Requantization offset
++extern const mpc_uint8_t      Res_bit [18];     ///< Bits per sample for chosen quantizer
++extern const MPC_SAMPLE_FORMAT __Cc    [1 + 18]; ///< Requantization coefficients
++extern const mpc_int16_t       __Dc    [1 + 18]; ///< Requantization offset
+
+ #define Cc (__Cc + 1)
+ #define Dc (__Dc + 1)
--
2.28.0

_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/1] package/musepack: fix build with gcc 10

Peter Korsgaard-2
>>>>> "Fabrice" == Fabrice Fontaine <[hidden email]> writes:

 > Fixes:
 >  - http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf

 > Signed-off-by: Fabrice Fontaine <[hidden email]>

Committed, thanks.

--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/1] package/musepack: fix build with gcc 10

Peter Korsgaard-2
In reply to this post by Fabrice Fontaine
>>>>> "Fabrice" == Fabrice Fontaine <[hidden email]> writes:

 > Fixes:
 >  - http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf

 > Signed-off-by: Fabrice Fontaine <[hidden email]>

Committed to 2020.08.x, thanks.

--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot