URL: <https://savannah.gnu.org/support/?111465>
Summary: libtool does not emit -Wl,--enable-auto-import
-Wl,--export-all-symbols -Wl on cygwin 32
Group: GNU Libtool
Submitter: pertusus
Submitted: Tue 27 Oct 2026 05:08:36 PM CET
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Unlocked
Operating System: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 27 Oct 2026 05:08:36 PM CET By: Patrice Dumas <pertusus>
In GNU Texinfo, we always build the libraries with libtool, but we can build
with Perl flags in addition to what libtool does or with libtool only.
ltmain.sh generated by libtool 2.6.2.
We use the Github continuous integration to test on various platforms. On
cygwin 32, without the Perl flags, an empty library is linked with the
following call (omitting many .o):
libtool: link: gcc -shared main/.libs/libtexinfo_la-tree.o
main/.libs/libtexinfo_la-text.o main/.libs/libtexinfo_la-base_utils.o
main/.libs/libtexinfo_la-builtin_commands.o
main/.libs/libtexinfo_la-types_data.o main/.libs/libtexinfo_la-debug.o
main/.libs/libtexinfo_la-errors.o .... -Wl,--whole-archive
./.libs/libcallperl_libtexinfo.a -Wl,--no-whole-archive -liconv -lintl -g
-O2 -o .libs/cygtexinfo-1.dll -Wl,--enable-auto-image-base -Xlinker
--out-implib -Xlinker .libs/libtexinfo.dll.a
Looking at libtexinfo.dll.a with nm, it is mostly empty.
The Perl flags add some Perl specific flags, some fstack protection which is
irrelevant and add the following two link flags which are most likely needed:
-Wl,--enable-auto-import -Wl,--export-all-symbols -Wl
It is strange that libtool does not add the flags by itself. Note that we
call:
LT_INIT([disable-static dlopen])
and do not specify win32-dll, because linking and using the libraries tend to
work (or at least link) on the other Windows/similar platforms, such as Cygwin
64 or some MSYS/mingw platforms.
We could add the abovementioned flags and it would probably work, but we
thought it would be better to try to have them emitted by libtool instead.
Here is some discussion on the bug-texinfo mailing list:
https://lists.gnu.org/archive/html/bug-texinfo/2026-10/msg00275.html
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111465>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
