0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 5ec265deac0da077c9b1e23fc52abe1b5f0696b5 Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <leah@libreboot.org>
  3. Date: Sat, 13 Jan 2024 14:57:46 +0000
  4. Subject: [PATCH 1/1] buildgcc: don't treat binutil warnings as errors
  5. binutils 2.32 has too many build warnings on modern toolchains,
  6. and newer gcc versions are much more pedantic about warnings,
  7. treating them as errors by default.
  8. instead of patching binutils like before, just let the warnings
  9. persist. the warnings are benign. a user on gnuboot irc had serious
  10. issues building binutils 2.32 specifically, on current gentoo as
  11. of 13 January 2024. this patch mitigates those warning messages.
  12. Signed-off-by: Leah Rowe <leah@libreboot.org>
  13. ---
  14. util/crossgcc/buildgcc | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
  17. index 505cd7484c..6f1953e68d 100755
  18. --- a/util/crossgcc/buildgcc
  19. +++ b/util/crossgcc/buildgcc
  20. @@ -719,7 +719,7 @@ build_BINUTILS() {
  21. --disable-werror --disable-nls --enable-lto --enable-gold \
  22. --enable-interwork --enable-multilib \
  23. --enable-plugins --enable-multilibs \
  24. - CFLAGS="$HOSTCFLAGS" \
  25. + CFLAGS="$HOSTCFLAGS -Wno-error -w" \
  26. CXXFLAGS="$HOSTCFLAGS" \
  27. || touch .failed
  28. # shellcheck disable=SC2086
  29. --
  30. 2.39.2