[PATCH 9/9] test-installation: skip libanl if not built
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Sep 24 16:41:04 GMT 2026
On 19/09/26 07:04, Xi Ruoyao wrote:
> For newer ports (such as LoongArch) libanl is not built at all.
libanl is the same kind of library as libdl, libpthread, librt and
libutil, which 6/9 already skips.
I noticed it is related to a bogus change I did (bc1e344dc1fb) were:
# Pretend that libanl.so is a linker script, so that the symbolic link
# is not installed.
install-lib-ldscripts = libanl.so
But later we have libnss_dns overwriting install-lib-ldscripts again with
"=" instead of "+=, so libanl.so has been installed ever since.
On ABIs where libanl is built, this patch passes only because of that bug.
I ran the script against an x86_64 install tree with the libanl.so link
removed, which is what bc1e344dc1f intended.
With the whole series applied it fails with:
Library libanl is not correctly installed since the test program
was not linked dynamically against it.
because -lanl picks up the empty libanl.a.
The have-GLIBC_2.34 check also does not match how the build decides.
On Hurd, sysdeps/htl/Makeconfig sets have-anl-library = yes
unconditionally, so on x86_64-gnu (baseline GLIBC_2.38) the script
would skip a libanl that is actually built.
I think it is simpler to drop this patch and skip "anl" unconditionally
with the other stub libraries in 6/9. With that change the script
passes on x86_64 both with and without the libanl.so link, and on a
LoongArch-like layout where libanl is not built. The resolv/Makefile
assignment should be fixed separately.
>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
> scripts/test-installation.pl | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
> index cce7691a92..7c1dbc8d5e 100755
> --- a/scripts/test-installation.pl
> +++ b/scripts/test-installation.pl
> @@ -81,15 +81,18 @@ if ($#ARGV == -1) {
> $dir = ".";
> $soversions="soversions.mk";
> $config="config.make";
> + $symversions="Versions.mk";
> } elsif ($#ARGV == 0) {
> if (-d $ARGV[0]) {
> $dir = $ARGV[0];
> $soversions = "$ARGV[0]/soversions.mk";
> $config = "$ARGV[0]/config.make";
> + $symversions = "$ARGV[0]/Versions.mk";
> } else {
> $soversions = $dir = $ARGV[0];
> $dir =~ s!/?[^/]*/*$!!;
> $config = $dir . "/config.make";
> + $symversions = $dir . "/Versions.mk";
> }
> } else {
> die "Wrong number of arguments.";
> @@ -101,6 +104,12 @@ if (system ("grep -q \"build-mathvec = yes\" $config") == 0) {
> $build_mathvec = 0;
> }
>
> +if (system ("grep -q \"have-GLIBC_2.34 = yes\" $symversions") == 0) {
> + $build_anl = 1;
> +} else {
> + $build_anl = 0;
> +}
> +
> # Read names and versions of all shared libraries that are part of
> # glibc
> open SOVERSIONS, $soversions
> @@ -130,8 +139,9 @@ while (<SOVERSIONS>) {
> "dl", "rt", "pthread", "util",
> );
> next if (grep { $_ eq $name } @skip);
> - # libmvec if it wasn't built
> + # libmvec and/or libanl if one wasn't built
> next if ($build_mathvec == 0 && $name eq "mvec");
> + next if ($build_anl == 0 && $name eq "anl");
> $link_libs .= " -l$name";
> $versions{$name} = $version;
> } elsif ($LD_SO ne "") {
More information about the Libc-alpha
mailing list