On Sun, 16 Feb 2020 08:04:12 +0100
Jeremie Courreges-Anglas wrote:

> On Sat, Feb 15 2020, Kurt Mosiejczuk <[email protected]> wrote:
> > http://build-failures.rhaalovely.net/sparc64/2020-02-11/geo/spatialite/gis.log
> > http://build-failures.rhaalovely.net/powerpc/2020-01-27/geo/spatialite/gis.log
> >
> > ok to mark this BROKEN-sparc64/BROKEN-powerpc ?
> 
> libtool strips -lrasterlite from the command line arguments, this
> looks wrong.
> 
> Also "-lstdc++ -lestdc++", boo.

So i studied the issue and found it, the applied code is not what
libtool's debug message and manpage say it is.

The second splice() tries to substitute stdc++ with estdc++, it is
not needed, because anyway orderedlibs seems always unique (i tried
by building stuff and using Data::Dumper).

As such, the conditional can be removed entirely, since we just want
to strip stdc++ from orderedlibs when estdc++ is present.

This fixes geo/spatialite/gis on macppc and sparc64.

The below diff against libtool survived a sparc64 bulk. I've built
cad/magic and devel/openmpi among other ports using ports-gcc as
COMPILER, without issues on amd64.

Comments/feedback are welcome,

Charlène.


Index: Link.pm
===================================================================
RCS file: /cvs/src/usr.bin/libtool/LT/Mode/Link.pm,v
retrieving revision 1.36
diff -u -p -r1.36 Link.pm
--- Link.pm     23 Jul 2017 09:48:53 -0000      1.36
+++ Link.pm     22 Feb 2020 14:34:51 -0000
@@ -832,14 +832,7 @@ sub common1
        my $is = $tiedlibs->indexof("stdc++");
        if (defined($ie) and defined($is)) {
                tsay {"stripping stdc++ from orderedlibs due to having estdc++ 
already; ie=$ie, is=$is"};
-               # check what library comes later
-               if ($ie < $is) {
-                       splice(@$orderedlibs, $ie, 1);
-                       splice(@$orderedlibs, $is, 1, "estdc++");
-                       $ie = $is;
-               } else {
-                       splice(@$orderedlibs, $is, 1);
-               }
+               splice(@$orderedlibs, $is, 1);
        }
        tsay {"staticlibs = \n", join("\n", @$staticlibs)};
        tsay {"orderedlibs = @$orderedlibs"};



Reply via email to