diff --git a/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch b/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch deleted file mode 100644 index a00ef9ef8d..0000000000 --- a/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d873c1b2ddf6818e3f814ab7f9c1ae34fe3da847 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 9 Nov 2026 08:37:30 -0800 -Subject: [PATCH] Only export getipnodebyname and freehostent where they exist - -dlib only interposes getipnodebyname() and freehostent() when the -platform has getipnodebyname() (Solaris), but they are always listed in -the exported symbols, so with glibc linkers that check the version -script, like lld, fail with: - - error: version script assignment of 'global' to symbol 'freehostent' failed: symbol not defined - -Leave them out of the symbol list when getipnodebyname() is not found. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - mapfile.m4 | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/mapfile.m4 b/mapfile.m4 -index 644a94b..5daa801 100644 ---- a/mapfile.m4 -+++ b/mapfile.m4 -@@ -13,7 +13,13 @@ if test x"$sol64" = xt; then - PLDDIRS="$PLDDIRS dlib64/" - fi - for symdir in $PLDDIRS; do -- cat include/symbols_preload.txt >> $symdir/$MAPFILE -+ #getipnodebyname() and freehostent() are only interposed where they exist -+ if test x"$ac_cv_func_getipnodebyname" = xyes; then -+ cat include/symbols_preload.txt >> $symdir/$MAPFILE -+ else -+ grep -v -e '^freehostent$' -e '^getipnodebyname$' \ -+ include/symbols_preload.txt >> $symdir/$MAPFILE -+ fi - - #platform dependent symbols - case $host in diff --git a/meta-networking/recipes-protocols/dante/dante/0001-Only-export-interposed-functions-that-exist-on-the-p.patch b/meta-networking/recipes-protocols/dante/dante/0001-Only-export-interposed-functions-that-exist-on-the-p.patch new file mode 100644 index 0000000000..ea7c3e03ff --- /dev/null +++ b/meta-networking/recipes-protocols/dante/dante/0001-Only-export-interposed-functions-that-exist-on-the-p.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 9 Nov 2026 08:37:30 -0800 +Subject: [PATCH] Only export interposed functions that exist on the platform + +dlib only interposes getipnodebyname() and freehostent() when the +platform has getipnodebyname() (Solaris), and rresvport() when it is +available (not on Android or musl), but they are always listed in the +exported symbols, so linkers that check the version script, like lld, +fail with: + + error: version script assignment of 'global' to symbol 'freehostent' failed: symbol not defined + error: version script assignment of 'global' to symbol 'rresvport' failed: symbol not defined + +Leave them out of the symbol list when configure did not find them. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + mapfile.m4 | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/mapfile.m4 b/mapfile.m4 +index 644a94b..dc964f8 100644 +--- a/mapfile.m4 ++++ b/mapfile.m4 +@@ -12,8 +12,16 @@ PLDDIRS="dlib/" #preloading (standard, non-Rfoo functions) + if test x"$sol64" = xt; then + PLDDIRS="$PLDDIRS dlib64/" + fi ++#only export interposed functions that exist on this platform ++PLDEXCLUDE="-e ^$" #skip blank lines ++if test x"$ac_cv_func_getipnodebyname" != xyes; then ++ PLDEXCLUDE="$PLDEXCLUDE -e ^freehostent$ -e ^getipnodebyname$" ++fi ++if test x"$ac_cv_func_rresvport" != xyes; then ++ PLDEXCLUDE="$PLDEXCLUDE -e ^rresvport$" ++fi + for symdir in $PLDDIRS; do +- cat include/symbols_preload.txt >> $symdir/$MAPFILE ++ grep -v $PLDEXCLUDE include/symbols_preload.txt >> $symdir/$MAPFILE + + #platform dependent symbols + case $host in diff --git a/meta-networking/recipes-protocols/dante/dante_1.4.4.bb b/meta-networking/recipes-protocols/dante/dante_1.4.4.bb index 8554c4610f..e15f7c4d41 100644 --- a/meta-networking/recipes-protocols/dante/dante_1.4.4.bb +++ b/meta-networking/recipes-protocols/dante/dante_1.4.4.bb @@ -12,7 +12,7 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=b3a8e7dc09bb720460f28c9d3796afa5" SRC_URI = "https://www.inet.no/dante/files/dante-${PV}.tar.gz \ - file://0001-Only-export-getipnodebyname-and-freehostent-where-th.patch \ + file://0001-Only-export-interposed-functions-that-exist-on-the-p.patch \ " SRC_URI[sha256sum] = "1973c7732f1f9f0a4c0ccf2c1ce462c7c25060b25643ea90f9b98f53a813faec"