libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PIC flags not found for mpif77(ifort)


From: Ralf Wildenhues
Subject: Re: PIC flags not found for mpif77(ifort)
Date: Thu, 16 Dec 2010 21:54:34 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Christian,

* Christian Rössel wrote on Thu, Dec 16, 2010 at 05:27:23PM CET:
> Am 12/16/2010 11:19 AM, schrieb Christian Rössel:
> > Am 12/15/2010 9:21 PM, schrieb Ralf Wildenhues:
> >> Hmm.  Is $GCC = yes for this compiler?  That would be surprising.
> >> Why else would the new branch not be matched?
> > 
> > yes, the Intel compiler claims to be a GNU compiler:
> > 
> > checking for gcc... icc
[...]
> > checking whether we are using the GNU C compiler... yes
> > 
> > I'm not sure how autoconf performs this check, but we came up with the
> > following to distinguish Intel from GNU:

Thanks.  So far we've more or less fared well with the assumption that
if the compiler claims it is GNU, then we just use the GCC settings.
If that doesn't work, then it's the compiler's fault to claim being GNU.

And now I wonder why you are having problems with 'mpif77 -f77=ifort'
because either it claims to be GNU (and then should accept -fPIC) or it
doesn't claim to be GNU (and then my proposed patch, including the fix
you spotted to double-quote the [CF]) should have worked.  Can you show
the config.log for the F77=mpif77 case that fails to detect the PIC flag?
Thanks.

As far as I remember, the older ifort versions at least didn't claim to
be GNU (unlike icc or icpc).

> > #if defined(__GNUC__) && ! (defined(__INTEL_COMPILER) || defined(__ICC))
> > /* using a gnu but not an intel compiler */
> > #endif
> 
> to prevent configure to identify Intel compilers as GNU compiler you
> need to add following code to _AC_LANG_COMPILER_GNU:
> 
> #if defined(__INTEL_COMPILER) || defined(__ICC)
>        choke me
> #endif
> 
> This is not a valid patch, I know. Can you please give me a hint where
> to find a how-to for providing autotools patches?

Good question.  The git[0] development trees[1] of Autoconf and Libtool
have files named HACKING that explain some bits.  Generalities are
documented in the GNU Coding Standards[2].  Portability issues are
documented in the portability sections of the Autoconf manual[3].
Patches posted as 'diff -u' output are fine however; 'git diff' or
'git format-patch' output is more convenient for us.

[0] http://git-scm.com/
[1] http://savannah.gnu.org/git/?group=autoconf
    http://savannah.gnu.org/git/?group=libtool
[2] http://www.gnu.org/prep/standards/html_node/index.html
[3] http://www.gnu.org/software/autoconf/manual/html_node/Portable-Shell.html

> >>> BTW, the same problem occurs for mpif77 and mpif90 using the PGI
> >>> compilers. Called with -V they produce:
> >>>
> >>> pgf90 10.9-0 64-bit target on x86-64 Linux -tp core2-64
> >>> Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
> >>> Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
> >>
> >> I suppose that could be fixed with the diff below on top
> >> (pending the fix for the issue above).
> > 
> > The patch for PGI works!

Great.  I've pushed that patch to the git tree.

Thanks,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]