Skip to content
Prev 18575 / 63424 Next

[PATCH] Add fpicflags for Intel(R) Fortran Compiler (PR#8344)

I've some playing with the Intel compilers, currently only on ia32.  As 
far as I can see Intel provides compilers for only two OSes and on 50% of 
those -fPIC is wrong so I do think this is really Linux-specific.
I have put in a Linux-specific change to set FPICFLAGS, but that is the 
least of the problems I have found.

The reason there is not a problem with the C compiler is that configure 
reports

 	checking whether we are using the GNU C compiler... yes

and so configure takes the builtin defaults for gcc.  This seems to come 
from the test of

int
main ()
{
#ifndef __GNUC__
        choke me
#endif

   ;
   return 0;
}

and so it seems that the masquerading by icc is intentional.  This has 
some consequences: for example package foreign assumes that GCC accepts 
-Wno-long-long, but icc does not act on it.  More seriously, it means that 
the default CFLAGS get set to "-g -O2", which is not what is documented. 
And with those flags, the build fails, incorrectly reporting that a regexp 
is invalid.

There are also problems with optimizing src/modules/dlamc.f under ifort.
On Tue, 22 Nov 2005, Danny van Dyk wrote: