include: autotools: do not symlink files in autoreconf
authorMatthias Schiffer <mschiffer@universe-factory.net>
Thu, 29 Aug 2024 18:04:02 +0000 (20:04 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Tue, 3 Sep 2024 15:48:40 +0000 (11:48 -0400)
commit6ad77082f8355d3e42d77f5b3d007492d5d0b4a1
tree4c46ba4ad9bca7801960aec470583994cbc8e709
parent326d99908a3527a0896b520c09998db786f6258c
include: autotools: do not symlink files in autoreconf

In Gluon's Github Actions CI, we were occasionally seeing bizarre build
errors that looked like a config.sub file had been corrupted, or changed
while it was being executed.

The cause turned out to be an interaction of the symlinks created by
autoreconf (pointing from individual tools' build dirs into
`staging_dir/host/share/automake-1.16`) and OpenWrt's host-build.mk,
which replaced config.guess and config.sub *after* autoreconf. The
result was that the replacement of these files ended up following the
symlinks and writing the files in `staging_dir/host/share/automake-1.16`
instead of a package's build dir. This could cause other packages' builds
to fail if they were currently executing the scripts while they were
being written.

To fix this, disable autoreconf's symlinking feature, so that modifying
these files in a package's build directory can't accidentally affect the
staged versions.

Link: https://github.com/openwrt/openwrt/pull/15825
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit c364cb8e469f9a7de1ed8960163c90e26b2df1ad)
include/autotools.mk