0002-remove-cpp-requirement.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. From dd65a8cfdeafeb18b72d8d1eb676c7ca43ae505f Mon Sep 17 00:00:00 2001
  2. From: Adam Duskett <Aduskett@gmail.com>
  3. Date: Mon, 16 Sep 2019 10:12:38 -0700
  4. Subject: [PATCH] remove cpp requirement
  5. The c++ test is necessary to ensure libglib doesn't accidentally use C++
  6. reserved keywords in public headers. Because this is just a test, it isn't
  7. necessary to have a C++ compiler to build libglib2.
  8. Signed-off-by: Adam Duskett <Aduskett@gmail.com>
  9. Upstream status: Denied (Buildroot specific)
  10. https://gitlab.gnome.org/GNOME/glib/issues/1748
  11. ---
  12. glib/glibconfig.h.in | 1 -
  13. meson.build | 19 +------------------
  14. 2 files changed, 1 insertion(+), 19 deletions(-)
  15. diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
  16. index e66748d95..2173d8be6 100644
  17. --- a/glib/glibconfig.h.in
  18. +++ b/glib/glibconfig.h.in
  19. @@ -119,7 +119,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
  20. @glib_vacopy@
  21. @g_have_iso_c_varargs@
  22. -@g_have_iso_cxx_varargs@
  23. /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
  24. * is passed ISO vararg support is turned off, and there is no work
  25. diff --git a/meson.build b/meson.build
  26. index 48fdfe864..5df242e39 100644
  27. --- a/meson.build
  28. +++ b/meson.build
  29. @@ -1,4 +1,4 @@
  30. -project('glib', 'c', 'cpp',
  31. +project('glib', 'c',
  32. version : '2.72.3',
  33. # NOTE: We keep this pinned at 0.52 because that's what Debian Stable ships
  34. meson_version : '>= 0.52.0',
  35. @@ -10,7 +10,6 @@ project('glib', 'c', 'cpp',
  36. )
  37. cc = meson.get_compiler('c')
  38. -cxx = meson.get_compiler('cpp')
  39. cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper()
  40. @@ -495,7 +494,6 @@ else
  41. endif
  42. add_project_arguments(cc.get_supported_arguments(warning_c_args), language: 'c')
  43. -add_project_arguments(cxx.get_supported_arguments(warning_cxx_args), language: 'cpp')
  44. # FIXME: We cannot build some of the GResource tests with -z nodelete, which
  45. # means we cannot use that flag in add_project_link_arguments(), and must add
  46. @@ -1734,20 +1732,6 @@ if g_have_iso_c_varargs
  47. #endif''')
  48. endif
  49. -g_have_iso_cxx_varargs = cxx.compiles('''
  50. - void some_func (void) {
  51. - int a(int p1, int p2, int p3);
  52. - #define call_a(...) a(1,__VA_ARGS__)
  53. - call_a(2,3);
  54. - }''', name : 'ISO C99 varargs macros in C++')
  55. -
  56. -if g_have_iso_cxx_varargs
  57. - glibconfig_conf.set('g_have_iso_cxx_varargs', '''
  58. -#ifdef __cplusplus
  59. -# define G_HAVE_ISO_VARARGS 1
  60. -#endif''')
  61. -endif
  62. -
  63. g_have_gnuc_varargs = cc.compiles('''
  64. void some_func (void) {
  65. int a(int p1, int p2, int p3);
  66. @@ -2381,7 +2365,6 @@ subdir('gobject')
  67. subdir('gthread')
  68. subdir('gmodule')
  69. subdir('gio')
  70. -subdir('fuzzing')
  71. if build_tests
  72. subdir('tests')
  73. endif
  74. --
  75. 2.34.1