Files
buildroot/package/libglib2/0003-remove-cpp-requirement.patch
Adam Duskett 01d3360eb6 package/libglib2: bump to 2.62.3
Changes include:
 - Rename 0002-add-option-to-build-tests.patch to
   0002-allow-explicit-disabling-of-tests.patch to work with 2.62.3.

   Upstream now has an option called "installed_tests," which can be used to
   prevent the unit tests from being built. However, the check only works for
   cross-compiling and not host builds, which would mean that the tests still
   build when compiling the host variant.

   This conditional causes an error on older systems such as Debian8 or Centos7
   because the command `objcopy --add-symbol` is used when building the test
   "test_resources2," which is not available with the older version of objcopy
   provided by those distributions.

   Removing the conditionals and checking for just the installed_tests_enabled
   option allows for a much simpler patch.

 - Change -Dtests=false to -Dinstalled_tests=false in libglib2.mk as per the
   above comment.

           br-arm-full [1/6]: OK
br-arm-cortex-a9-glibc [2/6]: OK
 br-arm-cortex-m4-full [3/6]: SKIPPED
        br-x86-64-musl [4/6]: OK
    br-arm-full-static [5/6]: OK
          sourcery-arm [6/6]: OK

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-30 23:07:33 +01:00

91 lines
2.4 KiB
Diff

From 2f168951df1feebeac549ada1ea44ea092484c54 Mon Sep 17 00:00:00 2001
From: Adam Duskett <Aduskett@gmail.com>
Date: Mon, 16 Sep 2019 10:12:38 -0700
Subject: [PATCH] remove cpp requirement
The c++ test is necessary to ensure libglib doesn't accidentally use C++
reserved keywords in public headers. Because this is just a test, it isn't
necessary to have a C++ compiler to build libglib2.
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Upstream status: Denied (Buildroot specific)
https://gitlab.gnome.org/GNOME/glib/issues/1748
---
glib/glibconfig.h.in | 1 -
meson.build | 16 ----------------
tests/meson.build | 5 -----
3 files changed, 22 deletions(-)
diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
index 7ef8c48..128e65d 100644
--- a/glib/glibconfig.h.in
+++ b/glib/glibconfig.h.in
@@ -117,7 +117,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
@glib_vacopy@
@g_have_iso_c_varargs@
-@g_have_iso_cxx_varargs@
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
* is passed ISO vararg support is turned off, and there is no work
diff --git a/meson.build b/meson.build
index 83774d0..99806d0 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,6 @@ project('glib', 'c', 'cpp',
)
cc = meson.get_compiler('c')
-cxx = meson.get_compiler('cpp')
cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper()
@@ -1490,20 +1489,6 @@ if g_have_iso_c_varargs
#endif''')
endif
-g_have_iso_cxx_varargs = cxx.compiles('''
- void some_func (void) {
- int a(int p1, int p2, int p3);
- #define call_a(...) a(1,__VA_ARGS__)
- call_a(2,3);
- }''', name : 'ISO C99 varargs macros in C++')
-
-if g_have_iso_cxx_varargs
- glibconfig_conf.set('g_have_iso_cxx_varargs', '''
-#ifdef __cplusplus
-# define G_HAVE_ISO_VARARGS 1
-#endif''')
-endif
-
g_have_gnuc_varargs = cc.compiles('''
void some_func (void) {
int a(int p1, int p2, int p3);
@@ -2101,7 +2086,6 @@ subdir('gobject')
subdir('gthread')
subdir('gmodule')
subdir('gio')
-subdir('fuzzing')
if build_tests
subdir('tests')
endif
diff --git a/tests/meson.build b/tests/meson.build
index e4ea226..7fd974c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -56,11 +56,6 @@ tests = {
'source': 'module-test.c',
'c_args': ['-DMODULE_TYPE="plugin"'],
},
- 'cxx-test' : {
- 'source' : 'cxx-test.cpp',
- 'include_directories' : gmoduleinc,
- 'dependencies' : [libgio_dep],
- },
}
test_extra_programs = {
--
2.23.0