logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

elfutils-0.186-gnu99-cleanup.patch (1851B)


  1. From 14294f0502851c125cf4e0e7d8b2889836e986e5 Mon Sep 17 00:00:00 2001
  2. From: Adrian Ratiu <adrian.ratiu@collabora.com>
  3. Date: Tue, 10 Aug 2021 12:48:41 +0300
  4. Subject: [PATCH] configure.ac: drop unnecessary gnu99 extension checks
  5. It is true that Clang does not support all gnu99 extensions [1],
  6. but not all of them are used in the codebase and over time there
  7. have been code cleanup efforts to improve Clang support.
  8. For example after commit 779c57ea ("readelf: Pull advance_pc()
  9. in file scope") there are no more nested function declarations
  10. and elfutils now builds fine with Clang.
  11. So in the interest of enabling Clang builds we remove the only
  12. remaining blocker: the configure checks for nested functions and
  13. variable length arrays which are also unused.
  14. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964
  15. Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
  16. ---
  17. ChangeLog | 4 ++++
  18. configure.ac | 11 -----------
  19. 2 files changed, 4 insertions(+), 11 deletions(-)
  20. diff --git a/ChangeLog b/ChangeLog
  21. index 12b8f403..32f5b68d 100644
  22. --- a/ChangeLog
  23. +++ b/ChangeLog
  24. @@ -1,3 +1,7 @@
  25. +2021-08-10 Adrian Ratiu <adrian.ratiu@collabora.com>
  26. +
  27. + * configure.ac (AC_CACHE_CHECK): Drop unnecessary std=gnu99 checks
  28. +
  29. 2021-07-28 Mark Wielaard <mark@klomp.org>
  30. * configure.ac (AC_CHECK_DECLS): Add reallocarray check.
  31. diff --git a/configure.ac b/configure.ac
  32. index 7caff2c5..c14eb9f6 100644
  33. --- a/configure.ac
  34. +++ b/configure.ac
  35. @@ -112,17 +112,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
  36. int foo (int a)
  37. {
  38. for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
  39. -}
  40. -
  41. -double bar (double a, double b)
  42. -{
  43. - double square (double z) { return z * z; }
  44. - return square (a) + square (b);
  45. -}
  46. -
  47. -void baz (int n)
  48. -{
  49. - struct S { int x[[n]]; };
  50. }])],
  51. ac_cv_c99=yes, ac_cv_c99=no)
  52. CFLAGS="$old_CFLAGS"])
  53. --
  54. 2.32.0