]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
libtool: strip build system triplet from installed libtool script
authorAlejandro Hernandez Samaniego <alhe@linux.microsoft.com>
Tue, 4 Aug 2026 22:04:53 +0000 (22:04 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Aug 2026 16:50:36 +0000 (17:50 +0100)
The installed /usr/bin/libtool script sourced by any recipe that
inherits libtool contains build_alias=, build= and build_os= lines
populated by config.status with the *build machine's* triplet
(e.g. build=x86_64-pc-linux-gnu, build_alias=x86_64-linux). Those
values vary between autobuilder workers whose config.guess reports
different vendors or OS strings, which makes libtool.rpm non-
reproducible across the autobuilder pool and shows up as a diff in
the reproducibility selftest.

Extend the sanitising sed in remove-buildpaths.inc to blank those
three lines the same way the existing rules blank sysroot and
build-path references.

Verified locally: before this change the installed libtool contained
`build_alias=x86_64-linux`, `build=x86_64-pc-linux-gnu` and
`build_os=linux-gnu`; after this change all three lines are empty.

Assisted-by: AI - OpenAI
Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/libtool/remove-buildpaths.inc

index 1ca95aeace7664f784db39ba03da87981fdba3c0..31bae6fb629fc5718c47243105adf0797f662100 100644 (file)
@@ -9,5 +9,8 @@ do_install:append () {
             -e 's@^\(predep_objects="\).*@\1"@' \
             -e 's@^\(postdep_objects="\).*@\1"@' \
             -e "s@${HOSTTOOLS_DIR}/@@g" \
+            -e 's@^build_alias=.*@build_alias=@' \
+            -e 's@^build=.*@build=@' \
+            -e 's@^build_os=.*@build_os=@' \
             -i ${D}${bindir}/libtool
 }