GMP-5.0.1 with Mingw32: incorrect .def filename
laurent.rineau__gmp at normalesup.org
Tue Jun 15 13:08:09 CEST 2010
On Monday 14 June 2010 18:15:23 Laurent Rineau wrote:
> In GMP-5.0.1, the SOMAJOR of libgmp is 10 and the SOMAJOR of libgmpxx is 6.
> However, the configure.in around line 2211 says:
> case $host in
> *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
> # By default, build only static.
> # [snip a big comment]
> if test "$enable_shared" = yes; then
> GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols"
> -Wl,--output-def,.libs/libgmp-3.dll.def" LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS
> You can see that, on a Mingw platform, the --output-def linker flag is
> incorrect: the version number in the file name is "3", where is should be
> either "10" for libgmp or "6" for libgmpxx.
> I propose the attached patch: it puts those linker flags into a conditional
> part of Makefile.am. The condition is LIBGMP_DLL, which is turned into an
> Automake conditional in configure.in. That way, the setup of the flags can
> use the (Auto)Make variables $(LIBGMP_LT_CURRENT) and
> I have verified that, with this patch, the library builds with
> --enable-shared on the platform core2-unknown-linux-gnu, and on the
> cross-platform x86_64-unknown-linux-gnu with host=i686-pc-mingw32. I hope
> such a patch can be integrated in GMP.
Sorry my patch was not fully correct. Attached is a new one. The difference is
in the name of the def file: it should be suffixed .def instead of .dll.def,
and the version number was incorrect (it must be LT_CURRENT - LT_AGE).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13884 bytes
Desc: not available
More information about the gmp-bugs