1From 2f168951df1feebeac549ada1ea44ea092484c54 Mon Sep 17 00:00:00 2001 2From: Adam Duskett <Aduskett@gmail.com> 3Date: Mon, 16 Sep 2019 10:12:38 -0700 4Subject: [PATCH] remove cpp requirement 5 6The c++ test is necessary to ensure libglib doesn't accidentally use C++ 7reserved keywords in public headers. Because this is just a test, it isn't 8necessary to have a C++ compiler to build libglib2. 9 10Signed-off-by: Adam Duskett <Aduskett@gmail.com> 11Upstream status: Denied (Buildroot specific) 12https://gitlab.gnome.org/GNOME/glib/issues/1748 13--- 14 glib/glibconfig.h.in | 1 - 15 meson.build | 18 +----------------- 16 tests/meson.build | 5 ----- 17 3 files changed, 1 insertion(+), 23 deletions(-) 18 19diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in 20index 7ef8c48..128e65d 100644 21--- a/glib/glibconfig.h.in 22+++ b/glib/glibconfig.h.in 23@@ -117,7 +117,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr; 24 @glib_vacopy@ 25 26 @g_have_iso_c_varargs@ 27-@g_have_iso_cxx_varargs@ 28 29 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi 30 * is passed ISO vararg support is turned off, and there is no work 31diff --git a/meson.build b/meson.build 32index 4bbf4c2..ac59f4e 100644 33--- a/meson.build 34+++ b/meson.build 35@@ -1,4 +1,4 @@ 36-project('glib', 'c', 'cpp', 37+project('glib', 'c', 38 version : '2.68.4', 39 # NOTE: We keep this pinned at 0.49 because that's what Debian 10 ships 40 meson_version : '>= 0.49.2', 41@@ -10,7 +10,6 @@ project('glib', 'c', 'cpp', 42 ) 43 44 cc = meson.get_compiler('c') 45-cxx = meson.get_compiler('cpp') 46 47 cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper() 48 49@@ -1679,20 +1678,6 @@ if g_have_iso_c_varargs 50 #endif''') 51 endif 52 53-g_have_iso_cxx_varargs = cxx.compiles(''' 54- void some_func (void) { 55- int a(int p1, int p2, int p3); 56- #define call_a(...) a(1,__VA_ARGS__) 57- call_a(2,3); 58- }''', name : 'ISO C99 varargs macros in C++') 59- 60-if g_have_iso_cxx_varargs 61- glibconfig_conf.set('g_have_iso_cxx_varargs', ''' 62-#ifdef __cplusplus 63-# define G_HAVE_ISO_VARARGS 1 64-#endif''') 65-endif 66- 67 g_have_gnuc_varargs = cc.compiles(''' 68 void some_func (void) { 69 int a(int p1, int p2, int p3); 70@@ -2330,7 +2315,6 @@ subdir('gobject') 71 subdir('gthread') 72 subdir('gmodule') 73 subdir('gio') 74-subdir('fuzzing') 75 if build_tests 76 subdir('tests') 77 endif 78diff --git a/tests/meson.build b/tests/meson.build 79index e4ea226..7fd974c 100644 80--- a/tests/meson.build 81+++ b/tests/meson.build 82@@ -55,11 +55,6 @@ tests = { 83 'source': 'module-test.c', 84 'c_args': ['-DMODULE_TYPE="plugin"'], 85 }, 86- 'cxx-test' : { 87- 'source' : 'cxx-test.cpp', 88- 'include_directories' : gmoduleinc, 89- 'dependencies' : [libgio_dep], 90- }, 91 } 92 93 test_extra_programs = { 94-- 952.23.0 96 97