Submitted By:            Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
Date:                    2012-08-29
Initial Package Version: 2.16.0
Upstream Status:         From upstream
Origin:                  http://sourceware.org/bugzilla/attachment.cgi?id=6616
Description:             Fix a problem running test-installation.pl

diff --git a/Makefile b/Makefile
index b0d3edb..50c3eed 100644
--- a/Makefile
+++ b/Makefile
@@ -111,7 +111,7 @@ install:
 ifneq (no,$(PERL))
 ifeq (/usr,$(prefix))
 ifeq (,$(install_root))
-	CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx)
+	LD_SO=$(ld.so-version) CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx)
 endif
 endif
 endif
diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
index 1b22086..cbe8d80 100755
--- a/scripts/test-installation.pl
+++ b/scripts/test-installation.pl
@@ -25,6 +25,11 @@ if ($ENV{CC}) {
 } else {
   $CC= "gcc";
 }
+if ($ENV{LD_SO}) {
+  $LD_SO = $ENV{LD_SO};
+} else {
+  $LD_SO= "";
+}
 
 sub usage {
   print "Usage: test-installation [soversions.mk]\n";
@@ -112,6 +117,8 @@ while (<SOVERSIONS>) {
       $link_libs .= " -l$name";
       $versions{$name} = $version;
     }
+  } elsif ($LD_SO ne "") {
+    ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO);
   } else {
     if (/^ld\.so/) {
       ($ld_so_name, $ld_so_version)= /=(.*)\.so\.(.*)$/;
