diff mbox series

[meta-oe,4/4] neon: Enable linker version script and drop stale map entry

Message ID 20261119035228.1759400-4-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/4] libidn: Enable linker version script explicitly | expand

Commit Message

Khem Raj Nov. 19, 2026, 3:52 a.m. UTC
configure's linker version script check links an empty program with a
script that assigns versions to an undefined symbol 'sym'. lld defaults
to --no-undefined-version and rejects it, so with ld-is-lld libneon was
built without the NEON_* symbol versions, silently changing its ABI.
Enable version scripts explicitly instead of relying on the probe.

neon.vers also lists ne_sock_writev, which has never existed (the API
is ne_sock_fullwritev), and lld fails the link on it. Remove it.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../0001-neon.vers-Drop-ne_sock_writev.patch  | 31 +++++++++++++++++++
 meta-oe/recipes-support/neon/neon_0.37.1.bb   |  3 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch b/meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch
new file mode 100644
index 0000000000..94f63cf299
--- /dev/null
+++ b/meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch
@@ -0,0 +1,31 @@ 
+From ef1f415170cfbb891a04af68852c9ea85c63d2c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Nov 2026 01:52:06 -0800
+Subject: [PATCH] neon.vers: Drop ne_sock_writev
+
+There is no ne_sock_writev() function; the vectored write API is
+ne_sock_fullwritev(), which is already listed in the same version
+node. GNU ld silently ignores the stale entry, but lld defaults to
+--no-undefined-version and fails the link:
+
+  ld.lld: error: version script assignment of 'NEON_0_29' to symbol
+  'ne_sock_writev' failed: symbol not defined
+
+Upstream-Status: Submitted [https://github.com/notroj/neon/pull/255]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/neon.vers | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/neon.vers b/src/neon.vers
+index c2a4dcb..ce5339a 100644
+--- a/src/neon.vers
++++ b/src/neon.vers
+@@ -3,7 +3,6 @@
+
+ NEON_0_29 {
+     ne_iaddr_raw;
+-    ne_sock_writev;
+     ne_sock_fullwritev;
+     ne_sock_set_error;
+     ne_sock_proxy;
diff --git a/meta-oe/recipes-support/neon/neon_0.37.1.bb b/meta-oe/recipes-support/neon/neon_0.37.1.bb
index 53790e6ac2..0516ca9be7 100644
--- a/meta-oe/recipes-support/neon/neon_0.37.1.bb
+++ b/meta-oe/recipes-support/neon/neon_0.37.1.bb
@@ -8,6 +8,7 @@  LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a
 SRC_URI = "https://notroj.github.io/neon/neon-${PV}.tar.gz \
            file://pkgconfig.patch \
            file://0001-Disable-installing-documentation.patch \
+           file://0001-neon.vers-Drop-ne_sock_writev.patch \
            file://run-ptest \
            "

@@ -30,7 +31,7 @@  PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
 PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
 PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"

-EXTRA_OECONF += "--enable-shared --enable-threadsafe-ssl=posix"
+EXTRA_OECONF += "--enable-shared --enable-threadsafe-ssl=posix --enable-ld-version-script"

 do_configure:prepend() {
     echo "${PV}" > ${S}/.version