Skip to contentSkip to conversation

package/libmad: update the patches to be applied with fuzz 0

PATCH In review Dario Binacchi 3 participants 5 messages Jul 2, 2024 – Jul 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libmad: update the patches to be applied with fuzz 0

Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum fuzz factor to 0") reduced the fuzz factor.

Due to this change, libmad fails to build with output:

Applying mips-gcc4.4.diff using series:
patching file fixed.h
Hunk #1 FAILED at 297.
1 out of 1 hunk FAILED -- saving rejects to file fixed.h.rej

The package applied the patches in two steps, first the local ones and then the official ones downloaded from the repository. The commit fixes the issue by reversing the order of patch application steps.

---
 package/libmad/libmad.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libmad/libmad.mk +1 -1
index 084a533cc00c..9f3396b1a4e8 100644
@@ -19,7 +19,7 @@ define LIBMAD_APPLY_DEBIAN_PATCHES
 	fi
 endef
 
-LIBMAD_POST_PATCH_HOOKS += LIBMAD_APPLY_DEBIAN_PATCHES
+LIBMAD_PRE_PATCH_HOOKS += LIBMAD_APPLY_DEBIAN_PATCHES
 
 # debian/patches/md_size.diff
 LIBMAD_IGNORE_CVES += CVE-2017-8372 CVE-2017-8373
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/libmad: drop GCC's "-fforce-mem" option

The commit fixes the following compilation error:

i686-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option ‘-fforce-mem’

From GCC 4.3 release notes [1]:

The -fforce-mem option has been removed because it has had no effect in the last few GCC releases.

[1] https://gcc.gnu.org/gcc-4.3/changes.html

---
 .../0003-drop-GCC-fforce-mem-option.patch      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 package/libmad/0003-drop-GCC-fforce-mem-option.patch
package/libmad/0003-drop-GCC-fforce-mem-option.patch new file +18 -0
new file mode 100644
index 000000000000..dc832ac70514
@@ -0,0 +1,18 @@
+configure.ac: drop GCC "-fforce-mem" option 
+
+As reported at [1], the option has been removed from version 4.3 of GCC.
+
+[1] https://ez.analog.com/dsp/software-and-development-tools/linux-blackfin/linux-bug-archive/w/documents/7460/5626-build-lib-mad-fail-at-option--fforce-mem-with-gcc-4-3
+Signed-off-by: Dario Binacchi <[email protected]>
+Upstream: N/A [Buildroot specific]
+
+--- libmad-0.15.1b-orig/configure.ac	2024-07-02 14:26:40.657984791 +0200
++++ libmad-0.15.1b/configure.ac	2024-07-02 14:27:07.098198997 +0200
+@@ -140,7 +140,6 @@
+     case "$optimize" in
+ 	-O|"-O "*)
+ 	    optimize="-O"
+-	    optimize="$optimize -fforce-mem"
+ 	    optimize="$optimize -fforce-addr"
+ 	    : #x optimize="$optimize -finline-functions"
+ 	    : #- optimize="$optimize -fstrength-reduce"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/libmad: drop GCC's "-fforce-mem" option

Quoted 22 lines · Dario Binacchi

The commit fixes the following compilation error:

i686-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option ‘-fforce-mem’

From GCC 4.3 release notes [1]:

The -fforce-mem option has been removed because it has had no effect in the last few GCC releases.

[1] https://gcc.gnu.org/gcc-4.3/changes.html

---
  .../0003-drop-GCC-fforce-mem-option.patch      | 18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

create mode 100644 package/libmad/0003-drop-GCC-fforce-mem-option.patch

package/libmad/0003-drop-GCC-fforce-mem-option.patch new file +0 -0
new file mode 100644
index 000000000000..dc832ac70514

package/libmad/0003-drop-GCC-fforce-mem-option.patch line 7

Quoted 7 lines
package/libmad/0003-drop-GCC-fforce-mem-option.patch new file +7 -0
@@ -0,0 +1,18 @@
+configure.ac: drop GCC "-fforce-mem" option
+
+As reported at [1], the option has been removed from version 4.3 of GCC.
+
+[1] https://ez.analog.com/dsp/software-and-development-tools/linux-blackfin/linux-bug-archive/w/documents/7460/5626-build-lib-mad-fail-at-option--fforce-mem-with-gcc-4-3
+Signed-off-by: Dario Binacchi <[email protected]>
+Upstream: N/A [Buildroot specific]

This is not Buildroot specific at all, anyone using libmad at this time is
going to hit the issue.

So I've changed this to Upstream: Dead

Which is also not entirely true because there's a fork at [1], but OK.

With that change, applied both to master, thanks.

Regards,
Arnout

[1] https://github.com/sezero/libmad

package/libmad/0003-drop-GCC-fforce-mem-option.patch line 18

Quoted 11 lines
package/libmad/0003-drop-GCC-fforce-mem-option.patch new file +11 -0
+
+--- libmad-0.15.1b-orig/configure.ac	2024-07-02 14:26:40.657984791 +0200
++++ libmad-0.15.1b/configure.ac	2024-07-02 14:27:07.098198997 +0200
+@@ -140,7 +140,6 @@
+     case "$optimize" in
+ 	-O|"-O "*)
+ 	    optimize="-O"
+-	    optimize="$optimize -fforce-mem"
+ 	    optimize="$optimize -fforce-addr"
+ 	    : #x optimize="$optimize -finline-functions"
+ 	    : #- optimize="$optimize -fstrength-reduce"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [PATCH 2/2] package/libmad: drop GCC's "-fforce-mem" option

In reply to Dario Binacchi
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dario" == Dario Binacchi <[email protected]> writes:

The commit fixes the following compilation error:
i686-buildroot-linux-gnu-gcc.br_real: error: unrecognized command-line option ‘-fforce-mem’

Quoted 7 lines

From GCC 4.3 release notes [1]:

The -fforce-mem option has been removed because it has had no effect in the last few GCC releases.

[1] https://gcc.gnu.org/gcc-4.3/changes.html

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Dario Binacchi
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dario" == Dario Binacchi <[email protected]> writes:

Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum fuzz factor to 0") reduced the fuzz factor.

Due to this change, libmad fails to build with output:

Applying mips-gcc4.4.diff using series:
patching file fixed.h
Hunk #1 FAILED at 297.
1 out of 1 hunk FAILED -- saving rejects to file fixed.h.rej

Quoted 5 lines

The package applied the patches in two steps, first the local ones and then the official ones downloaded from the repository. The commit fixes the issue by reversing the order of patch application steps.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot