bisect-runner.pl should search for lib*.a as well as lib*.so
authorNicholas Clark <nick@ccl4.org>
Mon, 9 Apr 2012 07:14:21 +0000 (09:14 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 May 2013 07:19:27 +0000 (09:19 +0200)
When forcing the library list on earlier perls to avoid versioned shared
objects, also look for static libraries. Also, ensure bisect-runner.pl
searches additional library paths given to it via -Alibpth

Without this, one can't test build against static libraries in non-standard
locations.

Porting/bisect-runner.pl

index 434bb37..0f4ff06 100755 (executable)
@@ -909,6 +909,10 @@ patch_hints();
 # bail out pretty early on. Configure won't let us override libswanted, but it
 # will let us override the entire libs list.
 
+foreach (@{$options{A}}) {
+    push @paths, $1 if /^libpth=(.*)/s;
+}
+
 unless (extract_from_file('Configure', 'ignore_versioned_solibs')) {
     # Before 1cfa4ec74d4933da, so force the libs list.
 
@@ -918,7 +922,9 @@ unless (extract_from_file('Configure', 'ignore_versioned_solibs')) {
     foreach my $lib (qw(sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld
                        ld sun m crypt sec util c cposix posix ucb BSD)) {
        foreach my $dir (@paths) {
-            next unless -f "$dir/lib$lib.$Config{dlext}";
+            # Note the wonderful consistency of dot-or-not in the config vars:
+            next unless -f "$dir/lib$lib.$Config{dlext}"
+                || -f "$dir/lib$lib$Config{lib_ext}";
            push @libs, "-l$lib";
            last;
        }