0003-remove-cpp-requirement.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. From 2f168951df1feebeac549ada1ea44ea092484c54 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 | 16 ----------------
  14. tests/meson.build | 5 -----
  15. 3 files changed, 22 deletions(-)
  16. diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
  17. index 7ef8c48..128e65d 100644
  18. --- a/glib/glibconfig.h.in
  19. +++ b/glib/glibconfig.h.in
  20. @@ -117,7 +117,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
  21. @glib_vacopy@
  22. @g_have_iso_c_varargs@
  23. -@g_have_iso_cxx_varargs@
  24. /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
  25. * is passed ISO vararg support is turned off, and there is no work
  26. diff --git a/meson.build b/meson.build
  27. index 83774d0..99806d0 100644
  28. --- a/meson.build
  29. +++ b/meson.build
  30. @@ -10,7 +10,6 @@ project('glib', 'c', 'cpp',
  31. )
  32. cc = meson.get_compiler('c')
  33. -cxx = meson.get_compiler('cpp')
  34. cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper()
  35. @@ -1490,20 +1489,6 @@ if g_have_iso_c_varargs
  36. #endif''')
  37. endif
  38. -g_have_iso_cxx_varargs = cxx.compiles('''
  39. - void some_func (void) {
  40. - int a(int p1, int p2, int p3);
  41. - #define call_a(...) a(1,__VA_ARGS__)
  42. - call_a(2,3);
  43. - }''', name : 'ISO C99 varargs macros in C++')
  44. -
  45. -if g_have_iso_cxx_varargs
  46. - glibconfig_conf.set('g_have_iso_cxx_varargs', '''
  47. -#ifdef __cplusplus
  48. -# define G_HAVE_ISO_VARARGS 1
  49. -#endif''')
  50. -endif
  51. -
  52. g_have_gnuc_varargs = cc.compiles('''
  53. void some_func (void) {
  54. int a(int p1, int p2, int p3);
  55. @@ -2101,7 +2086,6 @@ subdir('gobject')
  56. subdir('gthread')
  57. subdir('gmodule')
  58. subdir('gio')
  59. -subdir('fuzzing')
  60. if build_tests
  61. subdir('tests')
  62. endif
  63. diff --git a/tests/meson.build b/tests/meson.build
  64. index e4ea226..7fd974c 100644
  65. --- a/tests/meson.build
  66. +++ b/tests/meson.build
  67. @@ -56,11 +56,6 @@ tests = {
  68. 'source': 'module-test.c',
  69. 'c_args': ['-DMODULE_TYPE="plugin"'],
  70. },
  71. - 'cxx-test' : {
  72. - 'source' : 'cxx-test.cpp',
  73. - 'include_directories' : gmoduleinc,
  74. - 'dependencies' : [libgio_dep],
  75. - },
  76. }
  77. test_extra_programs = {
  78. --
  79. 2.23.0