lmsensors: Clean stale files for sensord to avoid incorrect GCC header dependencies

After upgrading GCC—for example, from 14.1.0 to 14.2.0—building lmsensors that
was previously compiled with GCC 14.1.0 may fail with an error like:
lmsensors/3.6.0/recipe-sysroot-native/usr/lib/x86_64-wrs-linux/gcc/x86_64-wrs-linux/
14.1.0/include/stddef.h can't find, which is needed by 'prog/sensord/args.rd'.

This occurs because prog/sensord/args.rd still references stale headers from the
older GCC version.
The root cause is that stale *.rd and *.ro files under prog/sensord are not
properly cleaned during do_configure. This patch ensures those files are removed
to prevent broken dependencies when GCC is upgraded.
Also remove the same statement in do_compile.

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Haixiao Yan 2025-04-10 17:11:11 +08:00 committed by Khem Raj
parent 2fb85f67dd
commit 86b20b84ec
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -51,8 +51,11 @@ EXTRA_OEMAKE = 'EXLDFLAGS="${LDFLAGS}" \
LIBDIR=${libdir} \
CC="${CC}" AR="${AR}"'
do_configure:prepend() {
sed -i -e 's:^#\(PROG_EXTRA\):\1:' ${S}/Makefile
}
do_compile() {
sed -i -e 's:^# \(PROG_EXTRA\):\1:' ${S}/Makefile
# Respect LDFLAGS
sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' ${S}/Makefile
sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \