Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/fdk-aac/files/, media-libs/fdk-aac/
Date: Sat, 17 Jul 2021 09:31:22
Message-Id: 1626514045.341fa332fd0514a8697cd229b6086370f927d5df.soap@gentoo
1 commit: 341fa332fd0514a8697cd229b6086370f927d5df
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 09:27:25 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 17 09:27:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=341fa332
7
8 media-libs/fdk-aac: Fix failed inlining
9
10 Closes: https://bugs.gentoo.org/798045
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 media-libs/fdk-aac/fdk-aac-2.0.2.ebuild | 2 +
14 .../files/fdk-aac-2.0.2-always_inline.patch | 72 ++++++++++++++++++++++
15 2 files changed, 74 insertions(+)
16
17 diff --git a/media-libs/fdk-aac/fdk-aac-2.0.2.ebuild b/media-libs/fdk-aac/fdk-aac-2.0.2.ebuild
18 index b003c4ad8fd..8e0360997fd 100644
19 --- a/media-libs/fdk-aac/fdk-aac-2.0.2.ebuild
20 +++ b/media-libs/fdk-aac/fdk-aac-2.0.2.ebuild
21 @@ -26,6 +26,8 @@ SLOT="0/2"
22
23 IUSE="static-libs examples"
24
25 +PATCHES=( "${FILESDIR}"/${P}-always_inline.patch )
26 +
27 src_prepare() {
28 default
29 [[ ${PV} == *9999* ]] && eautoreconf
30
31 diff --git a/media-libs/fdk-aac/files/fdk-aac-2.0.2-always_inline.patch b/media-libs/fdk-aac/files/fdk-aac-2.0.2-always_inline.patch
32 new file mode 100644
33 index 00000000000..afb2dbe1026
34 --- /dev/null
35 +++ b/media-libs/fdk-aac/files/fdk-aac-2.0.2-always_inline.patch
36 @@ -0,0 +1,72 @@
37 +From 7f328b93ee2aa8bb4e94613b6ed218e7525d8dc0 Mon Sep 17 00:00:00 2001
38 +From: David Seifert <soap@g.o>
39 +Date: Sat, 10 Jul 2021 13:06:57 +0200
40 +Subject: [PATCH] Do not force inlining of indirect functions
41 +
42 +* A function called indirectly cannot be decorated
43 + with `__attribute((always_inline))`, as this is
44 + guaranteed to only work with direct calls:
45 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220#c1
46 +
47 +Bug: https://bugs.gentoo.org/798045
48 +---
49 + libFDK/include/fft.h | 4 ++--
50 + libFDK/src/fft.cpp | 6 +++---
51 + 2 files changed, 5 insertions(+), 5 deletions(-)
52 +
53 +diff --git a/libFDK/include/fft.h b/libFDK/include/fft.h
54 +index d394046..4ef62b4 100644
55 +--- a/libFDK/include/fft.h
56 ++++ b/libFDK/include/fft.h
57 +@@ -139,7 +139,7 @@ void ifft(int length, FIXP_DBL *pInput, INT *scalefactor);
58 + * bit scale headroom. The values are interleaved, real/imag pairs.
59 + */
60 + LNK_SECTION_CODE_L1
61 +-static FDK_FORCEINLINE void fft_4(FIXP_DBL *x) {
62 ++static inline void fft_4(FIXP_DBL *x) {
63 + FIXP_DBL a00, a10, a20, a30, tmp0, tmp1;
64 +
65 + a00 = (x[0] + x[4]) >> 1; /* Re A + Re B */
66 +@@ -168,7 +168,7 @@ static FDK_FORCEINLINE void fft_4(FIXP_DBL *x) {
67 +
68 + #ifndef FUNCTION_fft_8
69 + LNK_SECTION_CODE_L1
70 +-static FDK_FORCEINLINE void fft_8(FIXP_DBL *x) {
71 ++static inline void fft_8(FIXP_DBL *x) {
72 + FIXP_SPK w_PiFOURTH = {{FIXP_SGL(0x5A82), FIXP_SGL(0x5A82)}};
73 +
74 + FIXP_DBL a00, a10, a20, a30;
75 +diff --git a/libFDK/src/fft.cpp b/libFDK/src/fft.cpp
76 +index 4e6fdd2..c9ee784 100644
77 +--- a/libFDK/src/fft.cpp
78 ++++ b/libFDK/src/fft.cpp
79 +@@ -170,7 +170,7 @@ amm-info@××××××××××××××.de
80 +
81 + /* Performs the FFT of length 2. Input vector unscaled, output vector scaled
82 + * with factor 0.5 */
83 +-static FDK_FORCEINLINE void fft2(FIXP_DBL *RESTRICT pDat) {
84 ++static inline void fft2(FIXP_DBL *RESTRICT pDat) {
85 + FIXP_DBL r1, i1;
86 + FIXP_DBL r2, i2;
87 +
88 +@@ -196,7 +196,7 @@ static FDK_FORCEINLINE void fft2(FIXP_DBL *RESTRICT pDat) {
89 +
90 + #ifndef FUNCTION_fft3
91 + /* Performs the FFT of length 3 according to the algorithm after winograd. */
92 +-static FDK_FORCEINLINE void fft3(FIXP_DBL *RESTRICT pDat) {
93 ++static inline void fft3(FIXP_DBL *RESTRICT pDat) {
94 + FIXP_DBL r1, r2;
95 + FIXP_DBL s1, s2;
96 + FIXP_DBL pD;
97 +@@ -233,7 +233,7 @@ static FDK_FORCEINLINE void fft3(FIXP_DBL *RESTRICT pDat) {
98 +
99 + /* performs the FFT of length 5 according to the algorithm after winograd */
100 + /* This version works with a prescale of 2 instead of 3 */
101 +-static FDK_FORCEINLINE void fft5(FIXP_DBL *RESTRICT pDat) {
102 ++static inline void fft5(FIXP_DBL *RESTRICT pDat) {
103 + FIXP_DBL r1, r2, r3, r4;
104 + FIXP_DBL s1, s2, s3, s4;
105 + FIXP_DBL t;
106 +--
107 +2.32.0
108 +