building gmp-6.1 for s390 (31-bit) w/asm disabled failing with undefined sdiv_qrnnd

Mike Frysinger vapier at gentoo.org
Fri Dec 9 18:43:34 UTC 2016


On 26 Nov 2016 17:06, Mike Frysinger wrote:
> On 27 Nov 2016 01:06, Torbjörn Granlund wrote:
> > Mike Frysinger <vapier at gentoo.org> writes:
> > 
> >   building gmp-6.1.0 & gmp-6.1.1 like so:
> >   ./configure \
> >   	--build=s390-ibm-linux-gnu --host=s390-ibm-linux-gnu \
> >   	--enable-shared --disable-assembly --enable-cxx --disable-static
> >   
> >   triggers this warning:
> >   udiv_w_sdiv.c: In function ‘__gmpn_udiv_w_sdiv’:
> >   udiv_w_sdiv.c:58:4: warning: implicit declaration of function ‘sdiv_qrnnd’ [-Wimplicit-function-declaration]
> >       sdiv_qrnnd (q, r, a1, a0, d);
> >   
> >   and the final lib has an undefined ref to the sdiv_qrnnd symbol.
> > 
> > Please try this https://gmplib.org/repo/gmp/rev/1890de258348 and comment
> > back.
> 
> it seemed to fix my builds.  thanks!

turns out, this causes problems too :(

now the __gmpn_udiv_w_sdiv symbol is exported based on the asm
configure flag.  mpfr will link against it if it's available,
and if you rebuild gmp w/asm disabled, then mpfr is left in a
broken state until it gets rebuilt.  this can be a problem when
gcc itself relies on gmp/mpfr now :).

here's gmp-6.1.0 built w/--enable-asm:
$ readelf -sW /usr/lib/libgmp.so | grep udiv_w_sdiv
   439: 00025538   366 FUNC    GLOBAL DEFAULT   10 __gmpn_udiv_w_sdiv
here it's built w/--disable-asm:
$ readelf -sW /usr/lib/libgmp.so | grep udiv_w_sdiv
<nothing>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://gmplib.org/pipermail/gmp-bugs/attachments/20161209/7f8010cf/attachment.bin>


More information about the gmp-bugs mailing list