Follow-up Comment #5, sr #111210 (group libtool): [comment #4 comment #4:] > I made the option available for other systems since I have seen other bug > reports [1] requesting the removal of '-nostdlib'.
I see. Then I'm fine with this.
I feel that the documentation is maybe a bit misleading. Actually, standard
libraries are always linked, it is rather the method to determine them that
changes.
Just a suggestion:
--- m4/ltoptions.m4
+++ m4/ltoptions.m4
@@ -468,7 +468,7 @@ m4_define([_LT_ENABLE_CXX_STDLIB],
stdlibflag=-nostdlib
AC_ARG_ENABLE([cxx-stdlib],
[AS_HELP_STRING([--enable-cxx-stdlib@<:@=PKGS@:>@],
- [try to link standard libraries when building C++ modules
@<:@default=]_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])],
+ [let the compiler frontend decide what standard libraries to link
when building C++ shared libraries and modules
@<:@default=]_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_cxx_stdlib=yes ;;
> I can update the configuration option patch
That would indeed simplify everything. Note a typo in your proposal: it's
enable_cxx_stdlib with underscores, not dashes. I also had to reset
stdlibflag. Maybe it's not the right place to do so, but I did this:
--- m4/libtool.m4
+++ m4/libtool.m4
@@ -3016,6 +3016,8 @@ netbsdelf*-gnu)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
+ enable_cxx_stdlib=yes
+ stdlibflag=
;;
netbsd*)
@@ -3034,6 +3036,8 @@ netbsd*)
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
+ enable_cxx_stdlib=yes
+ stdlibflag=
;;
*-mlibc)
Of course, your new option makes my initial patch obsolete, even though
stripping -lc, -lgcc_s and -lgcc is still wrong in the case
enable_cxx_stdlib=no. Maybe just stripping -lgcc would be less wrong:
--- m4/libtool.m4
+++ m4/libtool.m4
@@ -7315,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
fi
# Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1
| $GREP conftest.$objext | $SED -e "s:--as-needed -lgcc_s --no-as-needed -lgcc
-lc --as-needed -lgcc_s --no-as-needed -lgcc::"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1
| $GREP conftest.$objext | $SED -e "s:-lgcc::"'
;;
*nto* | *qnx*)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111210>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
