0042-further-gcc-15-fix-for-compiling-gmp.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 983835d1470dde4559d9ee58c60e65c0bb3873c2 Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <leah@libreboot.org>
  3. Date: Tue, 29 Apr 2025 23:13:42 +0100
  4. Subject: [PATCH 1/1] further gcc-15 fix for compiling gmp
  5. same as the previous fix, but we needed to apply
  6. the exact same change to the configure file, in
  7. the appropriate place.
  8. Signed-off-by: Leah Rowe <leah@libreboot.org>
  9. ---
  10. ...6.3.0_acinclude-m4-fix-std-c23-extra.patch | 30 +++++++++++++++++++
  11. 1 file changed, 30 insertions(+)
  12. create mode 100644 util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23-extra.patch
  13. diff --git a/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23-extra.patch b/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23-extra.patch
  14. new file mode 100644
  15. index 0000000000..bee0159abf
  16. --- /dev/null
  17. +++ b/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23-extra.patch
  18. @@ -0,0 +1,30 @@
  19. +From f1da82325f91ccf8f3a251c0f94388acf091c1fe Mon Sep 17 00:00:00 2001
  20. +From: Leah Rowe <leah@libreboot.org>
  21. +Date: Tue, 29 Apr 2025 23:11:25 +0100
  22. +Subject: [PATCH 1/1] further gcc-15 -std=23 mitigation
  23. +
  24. +the same fix as in the previous revision, also needs
  25. +to be applied here. this make the coreboot build process
  26. +pass, when compiling gmp.
  27. +
  28. +Signed-off-by: Leah Rowe <leah@libreboot.org>
  29. +---
  30. + configure | 2 +-
  31. + 1 file changed, 1 insertion(+), 1 deletion(-)
  32. +
  33. +diff --git a/configure b/configure
  34. +index 7910aa0..bd4342d 100755
  35. +--- a/configure
  36. ++++ b/configure
  37. +@@ -6568,7 +6568,7 @@ if test "$gmp_prog_cc_works" = yes; then
  38. +
  39. + #if defined (__GNUC__) && ! defined (__cplusplus)
  40. + typedef unsigned long long t1;typedef t1*t2;
  41. +-void g(){}
  42. ++void g(int,const t1 *,t1,t1 *,const t1 *,int){}
  43. + void h(){}
  44. + static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
  45. + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
  46. +--
  47. +2.39.5
  48. +
  49. --
  50. 2.39.5