[sr #111210] libtool.m4: Fix postdeps in NetBSD
anonymous <[email protected]> Wed, 26 Mar 2025 19:49:24 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
--8323329-1178581340-1743032964=:2701747
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline
Follow-up Comment #5, sr #111210 (group libtool):=0A=0A[comment #4 comment =
#4:]=0A> I made the option available for other systems since I have seen ot=
her bug=0A> reports [1] requesting the removal of '-nostdlib'.=0A=0AI see. =
Then I'm fine with this.=0AI feel that the documentation is maybe a bit mis=
leading. Actually, standard=0Alibraries are always linked, it is rather the=
method to determine them that=0Achanges.=0A=0AJust a suggestion:=0A=0A--- =
m4/ltoptions.m4=0A+++ m4/ltoptions.m4=0A@@ -468,7 +468,7 @@ m4_define([_LT_=
ENABLE_CXX_STDLIB],=0A stdlibflag=3D-nostdlib=0A AC_ARG_ENABLE([cxx-stdlib]=
,=0A [AS_HELP_STRING([--enable-cxx-stdlib@<:@=3DPKGS@:>@],=0A- =
[try to link standard libraries when building C++ modules=0A@<:@default=3D]=
_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])],=0A+ [let the compiler fronte=
nd decide what standard libraries to link=0Awhen building C++ shared librar=
ies and modules=0A@<:@default=3D]_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])],=0A =
[p=3D${PACKAGE-default}=0A case $enableval in=0A yes) enable_cx=
x_stdlib=3Dyes ;;=0A=0A=0A=0A> I can update the configuration option patch=
=0A=0AThat would indeed simplify everything. Note a typo in your proposal: =
it's=0Aenable_cxx_stdlib with underscores, not dashes. I also had to reset=
=0Astdlibflag. Maybe it's not the right place to do so, but I did this:=0A=
=0A=0A--- m4/libtool.m4=0A+++ m4/libtool.m4=0A@@ -3016,6 +3016,8 @@ netbsde=
lf*-gnu)=0A shlibpath_overrides_runpath=3Dno=0A hardcode_into_libs=3Dye=
s=0A dynamic_linker=3D'NetBSD ld.elf_so'=0A+ enable_cxx_stdlib=3Dyes=0A+=
stdlibflag=3D=0A ;;=0A =0A netbsd*)=0A@@ -3034,6 +3036,8 @@ netbsd*)=0A=
shlibpath_var=3DLD_LIBRARY_PATH=0A shlibpath_overrides_runpath=3Dyes=
=0A hardcode_into_libs=3Dyes=0A+ enable_cxx_stdlib=3Dyes=0A+ stdlibflag=
=3D=0A ;;=0A =0A *-mlibc)=0A=0A=0AOf course, your new option makes my ini=
tial patch obsolete, even though=0Astripping -lc, -lgcc_s and -lgcc is stil=
l wrong in the case=0Aenable_cxx_stdlib=3Dno. Maybe just stripping -lgcc wo=
uld be less wrong:=0A=0A=0A--- m4/libtool.m4=0A+++ m4/libtool.m4=0A@@ -7315=
,7 +7319,7 @@ if test yes !=3D "$_lt_caught_CXX_error"; then=0A _L=
T_TAGVAR(hardcode_shlibpath_var, $1)=3Dno=0A fi=0A # Workarou=
nd some broken pre-1.5 toolchains=0A- output_verbose_link_cmd=3D'$CC =
-shared $CFLAGS -v conftest.$objext 2>&1=0A| $GREP conftest.$objext | $SED =
-e "s:--as-needed -lgcc_s --no-as-needed -lgcc=0A-lc --as-needed -lgcc_s --=
no-as-needed -lgcc::"'=0A+ output_verbose_link_cmd=3D'$CC -shared $CF=
LAGS -v conftest.$objext 2>&1=0A| $GREP conftest.$objext | $SED -e "s:-lgcc=
::"'=0A ;;=0A =0A *nto* | *qnx*)=0A=0A=0A=0A=0A ___________=
____________________________________________=0A=0AReply to this item at:=0A=
=0A <https://savannah.gnu.org/support/?111210>=0A=0A______________________=
_________________________=0AMessage sent via Savannah=0Ahttps://savannah.gn=
u.org/=0A
--8323329-1178581340-1743032964=:2701747
Content-Type: APPLICATION/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ+SShAAKCRCqLAuaBUf3
Tti1AP9HXA1EEiNUwnaUeQv7n0EEGf9zzB3MUviQLzJpqw5aGQEA828peM22n2Lb
2dDSdWnhE0yN7KJ0iK31DIoR+hFu4A4=
=QTVr
-----END PGP SIGNATURE-----
--8323329-1178581340-1743032964=:2701747--