On Tue, 1 Jun 2004, Richard Hadsell wrote:
> I am upgrading my LAM to 7.0.6. We currently use Intel C++ 8.0 on our
> Linux x86 machines. I configured it with this command:
>
> configure --prefix=/whatever/lam-7.0.6 --with-exceptions --without-fc
> --with-signal=SIGURG --with-trillium
>
> This produces 2 warnings on each C++ compilation.
>
> One warning refers to unknown option '-fexceptions'. I assume this is
> due to the Intel compiler's definition of __GNUC__, which makes it look
> somewhat like g++. I could get rid of that by using 'icc -no-gcc', but
> I'm afraid that I would have to recompile all of our applications with
> the same option to make sure I don't introduce some strange
> incompatibility in a LAM or system header somewhere. I don't want to do
> that.
Ugh. Yes, this is how we determine that you're using the GNU compilers or
not; I can't believe that icc does that! Lame! :-(
(more specifically, this is how the GNU Autoconf internal test figures out
whether you are using the GNU compilers or not -- it's not even a
LAM-specific thing)
> I tried using '--with-exflags=' to persuade configure to not add any
> special flags to enable exceptions. That didn't work. It behaved the
> same as not using this option at all. I solved the problem using
> '--with-exflags=-w1', which is a harmless flag that specifies the kind
> of warnings you want to see, and its value is the default.
>
> However, it would be nice to be able to tell configure that the compiler
> needs no special flags to enable exceptions. Better would be for
> configure to determine that itself.
If icc is going to behave badly and pretend to be g++, I don't know how we
can know that for sure (it's not sufficient to even look at the basename
of the compiler because -- believe it or not -- I have seen sites that do
stuff like "ln -s icc gcc", and, even worse, "ln -s gcc icc"). :-(
Checking our logic for --with-exflags, I see it works like this:
-----
if test "$lam_force_exflags" != ""; then
lam_exflags="$lam_force_exflags"
-----
And note that "$lam_force_exflags" will be "" if you do --with-exflags="".
So this is a logic error on our part -- I can fix this for 7.1. For 7.1.,
you should specify --without-exflags, and that will pass in no additional
exception flags (I'll go commit this right now, and update the docs).
With LAM's current logic, your hackaround is ok, but note that you can put
*anything* in there to make it skip this. So other possibilities are:
--with-exflags=-DICC_IS_A_POSER
"-with-exflags= "
The second one is perhaps a bit more subtle (i.e., set the flags to be a
space), but may be less obvious. The first is a bit more obvious, and may
be easier to remember for future maintenance. ;-)
> The second warning refers to unsupported option '-MP'. I haven't
> figured out how to get rid of this. I don't see it as an option for
> g++, so I'm not at all sure what it is supposed to do.
Can you send more details on this? It could be an issue with libtool,
in which case we might not be able to do much -- for better or for worse,
we have decided that we can only support what libtool supports. :-\
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|