2012-08-29 H.J. Lu [BZ #14476] * Makefile (install): Also pass LD_SO=$(ld.so-version) to scripts/test-installation.pl. * scripts/test-installation.pl: Use LD_SO to get $ld_so_name and $ld_so_version if it is set. 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..51a75b1 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"; @@ -113,7 +118,7 @@ while () { $versions{$name} = $version; } } else { - if (/^ld\.so/) { + if ($LD_SO eq "" && /^ld\.so/) { ($ld_so_name, $ld_so_version)= /=(.*)\.so\.(.*)$/; } } @@ -121,6 +126,10 @@ while () { close SOVERSIONS; +if ($LD_SO ne "") { + ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO); +} + # Create test program and link it against all # shared libraries