diff mbox series

Fix test-installation.pl with missing libnss_test2

Message ID 20181022171606.15699-1-adhemerval.zanella@linaro.org
State New
Headers show
Series Fix test-installation.pl with missing libnss_test2 | expand

Commit Message

Adhemerval Zanella Netto Oct. 22, 2018, 5:16 p.m. UTC
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(-)

-- 
2.17.1
diff mbox series

Patch

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>) {