diff mbox series

[master] gettext: Fix falsely flagged static linking issue

Message ID 20261120121241.11349-1-UpStream_IP-SK@bmwtechworks.in
State New
Headers show
Series [master] gettext: Fix falsely flagged static linking issue | expand

Commit Message

Sana Kazi Nov. 20, 2026, 12:12 p.m. UTC
From: Sana Kazi <Kazi.S@bmwtechworks.in>

autotools_do_configure in autotools.bbclass deletes the
shipped configure scripts and runs one recursive
autoreconf --install --force. --install --force runs
libtoolize --copy --force per libtool subproject,
re-copying the lt*.m4 files with new timestamps.
The aclocal.m4 of gettext-runtime/intl is not refreshed
afterwards (gettext misconfiguration), so make considers
intl out of date and regenerates/reconfigures it in do_compile.
when make runs it sees the files with old timestamp and runs
config.status --recheck which is why we get false positive.

$ rg -n 'config.status --recheck|static flag -static works' tmp/work/x86-64-v3-oe-linux/gettext/1.0/temp/log.do_compile
124:checking if x86_64-oe-linux-gcc  -m64 -march=x86-64-v3 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sana/bsys/upstream/yocto/build/tmp/work/x86-64-v3-oe-linux/gettext/1.0/recipe-sysroot static flag -static works... (cached) yes

touch <file> just updates a file's "last modified" time
to right now, so that when make runs it knows that those
files are not stale and need not run config.status --recheck
which throws the false positive

Signed-off-by: Sana Kazi <Kazi.S@bmwtechworks.in>
---
 meta/recipes-core/gettext/gettext_1.0.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/gettext/gettext_1.0.bb b/meta/recipes-core/gettext/gettext_1.0.bb
index 8a93ce1b49..353eb46edd 100644
--- a/meta/recipes-core/gettext/gettext_1.0.bb
+++ b/meta/recipes-core/gettext/gettext_1.0.bb
@@ -70,6 +70,17 @@  PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_DIR_HOST},--
 PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_DIR_HOST},--disable-curses,ncurses,"
 PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux --disable-acl,attr libselinux"
 
+
+do_configure:append() {
+    touch "${S}/gettext-runtime/intl/aclocal.m4"
+    touch "${S}/gettext-runtime/intl/configure"
+    touch "${S}/gettext-runtime/intl/config.h.in"
+    touch "${S}/gettext-runtime/intl/Makefile.in"
+    touch "${B}/gettext-runtime/intl/config.status"
+    touch "${B}/gettext-runtime/intl/config.h"
+    touch "${B}/gettext-runtime/intl/Makefile"
+}
+
 do_install:append:libc-musl () {
 	rm -f ${D}${libdir}/charset.alias
 	rm -f ${D}${includedir}/libintl.h