[BZ,#18796] Fix scripts/test-installation.pl

Message ID CAMXFM3sH_HnSx01PJUd2FignmAZFV6Y7p=SeheAHKAMkbd9zdw@mail.gmail.com
State Committed
Headers

Commit Message

Andrew Senkevich Aug. 12, 2015, 8:59 p.m. UTC
  Hi,

this patch fixes scripts/test-installation.pl fail with --disable-mathvec.

2015-08-12  Andrew Senkevich  <andrew.senkevich@intel.com>

        [BZ #18796]
        * scripts/test-installation.pl: Don't add -lmvec to build options if
        libmvec wasn't built.


Is it ok?


--
WBR,
Andrew
  

Comments

Joseph Myers Aug. 18, 2015, 3:50 p.m. UTC | #1
On Wed, 12 Aug 2015, Andrew Senkevich wrote:

> Hi,
> 
> this patch fixes scripts/test-installation.pl fail with --disable-mathvec.
> 
> 2015-08-12  Andrew Senkevich  <andrew.senkevich@intel.com>
> 
>         [BZ #18796]
>         * scripts/test-installation.pl: Don't add -lmvec to build options if
>         libmvec wasn't built.

OK, for master and 2.22 branch.
  

Patch

diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
index cac1562..79b2b3e 100755
--- a/scripts/test-installation.pl
+++ b/scripts/test-installation.pl
@@ -80,16 +80,25 @@  arglist: while (@ARGV) {
 # We expect none or one argument.
 if ($#ARGV == -1) {
     $soversions="soversions.mk";
+    $config="config.make";
 } elsif ($#ARGV == 0) {
     if (-d $ARGV[0]) {
       $soversions = "$ARGV[0]/soversions.mk";
+      $config = "$ARGV[0]/config.make";
     } else {
-      $soversions = $ARGV[0];
+      $soversions = $dir = $ARGV[0];
+      $dir =~ s!/?[^/]*/*$!!;
+      $config = $dir . "/config.make";
     }
 } else {
     die "Wrong number of arguments.";
 }

+if (system ("grep -q \"build-mathvec = yes\" $config") == 0) {
+    $build_mathvec = 1;
+} else {
+    $build_mathvec = 0;
+}

 # Read names and versions of all shared libraries that are part of
 # glibc
@@ -111,6 +120,8 @@  while (<SOVERSIONS>) {
     # - libthread_db since it contains unresolved references
     # - it's just a test NSS module
     # - We don't provide the libgcc so we don't test it
+    # - libmvec if it wasn't built
+    next if ($build_mathvec == 0 && $name eq "mvec");
     if ($name ne "nss_ldap" && $name ne "db1"
        && !($name =~/^nss1_/) && $name ne "thread_db"
        && $name ne "nss_test1" && $name ne "libgcc_s") {