[patch #10569] FIx old_deplibs usage / archive-in-archive test

Ileana Dumitrescu <[email protected]> Thu, 21 May 2026 14:32:16 -0400 (EDT)
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
--8323329-424238335-1779388336=:2235467
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Update of patch #10569 (group libtool):=0A=0A                  Status:     =
               None =3D> Done=0A             Open/Closed:                  =
  Open =3D> Closed=0A=0A    _______________________________________________=
________=0A=0AFollow-up Comment #2:=0A=0AOn 16/05/2026 18:43, Alexandre Jan=
niaux wrote:=0A> Hi,=0A> =0A> I've investigated the testsuite with your fee=
dback and it seems all problems=0A> I missed are coming from the line mergi=
ng old_deplibs into dependency_libs.=0A> =0A> It seems using the same loop =
as the snippet above, ie. checking for=0A> absolute path and adding pwd if =
needed, is enough to fix the absolute=0A> path requirement. The test was fa=
iling because, fortunately in the test,=0A> the referenced static archive w=
as used from a different working directory.=0A> =0A> Then it was also faili=
ng on the test producing libltdl.so. It seems that=0A> I misunderstand this=
 part of the code back then and though it would only=0A> affect old librari=
es because the linker would use $deplibs when building=0A> the shared libra=
ry. However, the static archives would still be forwarded=0A> to dependency=
_libs in the final libtool archive because of that, which the=0A> testsuite=
 fortunately catched too. By gating the code with a check on=0A> library_na=
mes (so assuming static archives are squashed into the shared=0A> libraries=
), I can finally pass this last remaining test.=0A> =0A> Here is a new revi=
sion. with this change. The main changes are commit=0A> message to referenc=
e this issue and this line:=0A> =0A> +           func_append dependency_lib=
s " $old_deplibs"=0A> =0A> Transformed into:=0A> =0A> +         # Forward o=
ld library dependencies only when no shared=0A> +         # library is bein=
g built. When building the shared library,=0A> +         # the linker uses =
$deplibs to link the archives into it, but=0A> +         # then we don't wa=
nt to add it as transitive dependency.=0A> +         if test -z "$library_n=
ames"; then=0A> +           for lib in $old_deplibs; do=0A> +             c=
ase $lib in=0A> +               [\\/]* | [A-Za-z]:[\\/]*) abs=3D$lib ;;=0A>=
 +               *) abs=3D`pwd`"/$lib" ;;=0A> +             esac=0A> +     =
        func_append dependency_libs " $abs"=0A> +           done=0A> +     =
    fi=0A> =0A> I've copied the code above for path handling without accoun=
ting whether=0A> refactoring could be interesting or not.=0A=0AThank you fo=
r the updated patches! Most test failures were fixed, but the grep=0Acheck =
in archive-in-archive.at needed to updated for MSVC. I have applied your=0A=
patches to the development branch, which should migrate to the master branc=
h=0Abefore the next libtool release.=0A=0Ahttps://git.savannah.gnu.org/cgit=
/libtool.git/commit/?h=3Ddevelopment&id=3D2dfd9132f835657f6be7a63645a8331f0=
48370a6=0Ahttps://git.savannah.gnu.org/cgit/libtool.git/commit/?h=3Ddevelop=
ment&id=3Dec577ffbb3b5fc6752da7e26a23d11056a9f2cea=0Ahttps://git.savannah.g=
nu.org/cgit/libtool.git/commit/?h=3Ddevelopment&id=3Dc6ded7d821f7bda31ed56e=
f968ad78ab4f945085=0A=0A=0A    ____________________________________________=
___________=0A=0AReply to this item at:=0A=0A  <https://savannah.gnu.org/pa=
tch/?10569>=0A=0A_______________________________________________=0AMessage =
sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-424238335-1779388336=:2235467
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCag9PsAAKCRCqLAuaBUf3
Th6rAP0V6A4VQDed+z5AvYOtGNA3GtJcvXABvtQiZpA1PA1nfQEAtddpqqG+sGBr
WwMoqC9wFFZ7xEUw0UBKsvlH8u7xugY=
=rk4T
-----END PGP SIGNATURE-----

--8323329-424238335-1779388336=:2235467--