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

Torbjörn Granlund tg at gmplib.org
Fri Dec 9 21:29:18 UTC 2016


  > When other packages rely on reverse engineering of GMP's internals, then
  > things such as this are bound to happen.
  
  i don't think it's that simple
  
  and udiv_qrnnd in mpfr-longlong.h looks like:
  /* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through
     __udiv_w_sdiv (defined in libgcc or elsewhere).  */
  #if !defined (udiv_qrnnd) && defined (sdiv_qrnnd)
  #define udiv_qrnnd(q, r, nh, nl, d) \
    do {									\
      UWtype __r;								\
      (q) = __MPN(udiv_w_sdiv) (&__r, nh, nl, d);				\
      (r) = __r;								\
    } while (0)
  #endif
  
Right.  The longlong.h file is shared among several GNU programs, but I
long ago stopped trying to keep GMP's version easily usable outside of
GMP.

In particular, GMP's longlong.h requires various external functions, and
the condition under which these are needed are part of the internals.

This is a MPFR problem.  It is unfixable in GMP.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-bugs mailing list