[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PIC flags not found for mpif77(ifort)
From: |
Christian Rössel |
Subject: |
Re: PIC flags not found for mpif77(ifort) |
Date: |
Thu, 16 Dec 2010 17:27:23 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 |
Hi Ralf,
Am 12/16/2010 11:19 AM, schrieb Christian Rössel:
> Hi Ralf,
>
> Am 12/15/2010 9:21 PM, schrieb Ralf Wildenhues:
>> * Christian Rössel wrote on Wed, Dec 15, 2010 at 04:38:13PM CET:
>>> Am 12/10/2010 6:55 PM, schrieb Ralf Wildenhues:
>>>> Alternatively, the untested patch below should help as well. Can you
>>>> try it out?
>>>
>>> Unfortunately the patch didn't work. configure does not execute the new
>>> case branch although the innermost condition matches.
>>
>> 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 the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> 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:
>
> #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?
Thanks,
Christian
>>> 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!
>
> Thanks a lot,
> Christian
>
>> Thanks,
>> Ralf
>>
>> diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
>> index e735c75..7323986 100644
>> --- a/libltdl/m4/libtool.m4
>> +++ b/libltdl/m4/libtool.m4
>> @@ -4343,6 +4343,11 @@ m4_if([$1], [CXX], [
>> _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
>> _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
>> ;;
>> + *Portland\ Group*)
>> + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>> + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
>> + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
>> + ;;
>> esac
>> ;;
>> esac
>