]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
connman: Revert removal of no-version-scripts patch
authorPeter Tatrai <peter.tatrai.ext@siemens.com>
Thu, 28 Aug 2025 10:40:47 +0000 (12:40 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Sep 2025 10:40:06 +0000 (11:40 +0100)
This commit restores the no-version-scripts.patch for ConnMan,
which was removed in the commit (5c269ba9a396832af3f8139ecaa0cfd9f7d4d1b5)
as part of cleaning up gold and MIPS binutils workarounds.

The removal of this patch caused runtime crashes (segfaults)
on the powerpc target due to symbol visibility issues with glib
and stdio. Re-adding the patch resolves these crashes by disabling
version scripts in the linker flags.

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/connman/connman/no-version-scripts.patch [new file with mode: 0644]
meta/recipes-connectivity/connman/connman_1.45.bb

diff --git a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch b/meta/recipes-connectivity/connman/connman/no-version-scripts.patch
new file mode 100644 (file)
index 0000000..c96ab31
--- /dev/null
@@ -0,0 +1,48 @@
+From 67f37aafcc8ef5d2eb006387e7bec21f74518727 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 9 Aug 2016 12:12:02 +0100
+Subject: [PATCH] connman: disable version-scripts to fix crashes at startup
+
+With binutils 2.27 on at least PowerPC, connmand will crash on `connmand --help`.
+This appears to be due to the symbol visibilty scripts hiding symbols that stdio
+looks up at runtime, resulting in it segfaulting.
+
+This certainly appears to be a bug in binutils 2.27 although the problem has
+been known about for some time:
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=17908
+
+As the version scripts are only used to hide symbols from plugins we can safely
+remove the scripts to work around the problem until binutils is fixed.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
+---
+ Makefile.am | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 3dc3bb5..3be5ccb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -143,8 +143,7 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
+                       @GIO_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @GNUTLS_LIBS@ \
+                       -lresolv -ldl -lrt
+-src_connmand_LDFLAGS = -Wl,--export-dynamic \
+-                              -Wl,--version-script=$(srcdir)/src/connman.ver
++src_connmand_LDFLAGS = -Wl,--export-dynamic
+ src_connmand_wait_online_SOURCES = src/connmand-wait-online.c
+@@ -187,8 +186,7 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
+                               @GIO_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @GNUTLS_LIBS@ \
+                               -lresolv -ldl
+-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
+-                              -Wl,--version-script=$(srcdir)/vpn/vpn.ver
++vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic
+ endif
+ BUILT_SOURCES = $(local_headers) src/builtin.h $(service_files) \
index cfc6114712db5edf208c4e335ac9d3b6e24c732e..85f14eb80ecf7322f4c17830676e2e354d5eb777 100644 (file)
@@ -20,6 +20,7 @@ DEPENDS  = "dbus glib-2.0"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
            file://connman \
+           file://no-version-scripts.patch \
            file://0002-resolve-musl-does-not-implement-res_ninit.patch \
            "