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

Torbjörn Granlund tg at
Fri Dec 9 19:20:08 UTC 2016

Mike Frysinger <vapier at> writes:

  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/ | 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/ | grep udiv_w_sdiv

I don't see a solution to this within GMP.

When other packages rely on reverse engineering of GMP's internals, then
things such as this are bound to happen.

Please encrypt, key id 0xC8601622

More information about the gmp-bugs mailing list