Make fails on Intel Macs with ICC

Torbjorn Granlund tg-this-will-bounce-but-I-am-subscribed-to-the-list-honest at swox.com
Fri Jan 19 14:27:38 CET 2007


Tomas Zahradnicky <zahradnicky at kppm.cz> writes:

  I've tried to compile the latest GMP with ICC and it has failed.
  
  GMP Version: 4.2.1
  
  What's wrong: GMP does not build.
  
  Configured with: ../configure CC="icc" CFLAGS="-xP -g -O2" --with-
  prefix=/usr/local
  
  > /bin/sh ../libtool --mode=compile icc -DHAVE_CONFIG_H -I. -I../../
  > mpz -I.. -D__GMP_WITHIN_GMP -I../..    -xP -g -O2 -c -o  n_pow_ui.lo
  > ../../mpz/n_pow_ui.c
  > icc -DHAVE_CONFIG_H -I. -I../../mpz -I.. -D__GMP_WITHIN_GMP -I../..
  > -xP -g -O2 -c ../../mpz/n_pow_ui.c -o n_pow_ui.o
  > ../../mpz/n_pow_ui.c(370) : (col. 3) remark: LOOP WAS VECTORIZED.
  > ../../mpz/n_pow_ui.c(488): warning #1202: illegal character Q in
  > asm operand constraint
  >
  > ../../mpz/n_pow_ui.c(488): warning #1202: illegal character Q in
  > asm operand constraint
  >
  > ../../mpz/n_pow_ui.c(488): catastrophic error: cannot match asm
  > operand constraint
  >
  > compilation aborted for ../../mpz/n_pow_ui.c (code 4)
  > make[2]: *** [n_pow_ui.lo] Error 1
  > make[1]: *** [all-recursive] Error 1
  > make: *** [all] Error 2
  
"Catastrophic" error, swell.

The problem is that ICC pretends to be GCC, and thus switches on GCC's
inline assembly feature.  One needs to explicitly test for
__INTEL_COMPILER to exclude this assembly.

I'll patch future releases of GMP to work around this truly
catastrophic ICC misfeature.

-- 
Torbjörn


More information about the gmp-bugs mailing list