GMP-5.0.1 with Mingw32: incorrect .def filename
Laurent Rineau
laurent.rineau__gmp at normalesup.org
Tue Jun 29 16:34:33 CEST 2010
My following bug report and patch have been ignored, so far. I imagine that
GMP people interested in the Mingw32 support do not read gmp-bugs at gmplib.org
(or that set of people is empty).
What could be the right integration path for such a patch? Were should I
submit it?
On Tuesday 15 June 2010 13:08:09 Laurent Rineau wrote:
> On Monday 14 June 2010 18:15:23 Laurent Rineau wrote:
> > Hi,
> >
> > 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"
> > LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS
> >
> > -Wl,--output-def,.libs/libgmp-3.dll.def"
> > LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS
> > -Wl,--output-def,.libs/libgmpxx-3.dll.def"
> >
> > LIBGMP_DLL=1
> >
> > fi
> > ;;
> >
> > 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
> > $(LIBGMPXX_LT_CURRENT).
> >
> > 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).
More information about the gmp-bugs
mailing list