From Kurt.Hornik at wu-wien.ac.at  Wed Nov 23 21:28:05 2005
From: Kurt.Hornik at wu-wien.ac.at (Kurt Hornik)
Date: Wed, 23 Nov 2005 21:28:05 +0100
Subject: [Rd] [PATCH] Add fpicflags for Intel(R) Fortran
	Compiler	(PR#8344)
In-Reply-To: <Pine.LNX.4.61.0511231228060.1246@gannet.stats>
References: <20051122145025.4837FCA08@slim.kubism.ku.dk>
	<Pine.LNX.4.61.0511221611180.28852@gannet.stats>
	<43835DB4.5080204@gentoo.org>
	<Pine.LNX.4.61.0511231228060.1246@gannet.stats>
Message-ID: <17284.53461.987042.519447@mithrandir.hornik.net>

>>>>> Prof Brian Ripley writes:

> 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.

Not sure about the "assumption": there is a configure test for the
configured CC to accept command line argument '-Wno-long-long'.

But I see that foreign/src/swap_bytes.h.in has

#if defined __GNUC__ && __GNUC__ >= 2

#define swap_bytes_double(from, to)             \
do {                                            \
    union {                                     \
        unsigned long long int u64;             \
        double d;                               \
    } __from, __to;                             \

etc so this may be another instance of icc masquerading itself as gcc.

-k



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