This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix test-installation.pl with missing libnss_test2
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 22 Oct 2018 14:16:06 -0300
- Subject: [PATCH] Fix test-installation.pl with missing libnss_test2
This patch excludes libnss_test2 from libraries to link against (added
on ae5c498d93d) and also adds the linker option no-as-neeeded to avoid
the linker with this option as default to avoid linking with all the
libraries used on compiler invocation.
I checked installing glibc against a ubuntu16 chroot and issuing the
test-installation.pl directly.
[BZ #21911]
* scripts/test-installation.pl: Exclude libnss_test2 and use
no-as-needed linker option.
---
ChangeLog | 5 +++++
scripts/test-installation.pl | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
index b2e4ba7646..a294029cbf 100755
--- a/scripts/test-installation.pl
+++ b/scripts/test-installation.pl
@@ -125,7 +125,9 @@ while (<SOVERSIONS>) {
next if ($build_mathvec == 0 && $name eq "mvec");
if ($name ne "nss_ldap" && $name ne "db1"
&& $name ne "thread_db"
- && $name ne "nss_test1" && $name ne "libgcc_s") {
+ && $name ne "nss_test1"
+ && $name ne "nss_test2"
+ && $name ne "libgcc_s") {
$link_libs .= " -l$name";
$versions{$name} = $version;
}
@@ -156,7 +158,7 @@ int main(void) {
';
close PRG;
-open GCC, "$CC $dir/test-prg$$.c $link_libs -o $dir/test-prg$$ 2>&1 |"
+open GCC, "$CC $dir/test-prg$$.c -Wl,-no-as-needed $link_libs -o $dir/test-prg$$ 2>&1 |"
or die ("Couldn't execute $CC!");
while (<GCC>) {
--
2.17.1