Hello Orion,

* Orion Poplawski wrote on Thu, Oct 12, 2006 at 06:57:04PM CEST:
> I've been trying to build the openmpi 1.2 branch with the Intel and 
> Portland Fortran compilers and was having trouble using their 
> -i-static/-Bstatic_pgi options.

Your report touches several issues:

> I'm not sure what the most cross platform way to return only the first 
> argument is.

ompi_setup_f77.m4 should allow for more than one word in $F77.
Autoconf typically uses something like this to extract the first word:

# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2

so OpenMPI could use that, too (with variable names changed, of
course, so they don't interfere with Autoconf's),

> Of course, if there was a way to get these passed to the appropriate 
> link stages, we could avoid this.  But it looks like libtool strips the 
> -i-static argument and doesn't pass it on to the link command, not sure 
> about the -Bstatic_pgi argument.

Yes, this is a problem.  On the libtool command lines, you can use
  -Wc,-i-static

to get -i-static passed to the compiler driver; and
  -Wl,-i-static

to get it passed to the linker directly (but that would be wrong in this
case).  Unfortunately, you may not in general be able to stuff this in
LDFLAGS at configure time (I haven't tried, it may just happen to work),
so one different way would be to stick it in at make time only:
  make LDFLAGS=...

But then, configuring with 
> FC="ifort -i-static"

is a much better option: it tests the right setting at configure time.

Note there may still be issues: libtool should actually be able to
understand what -i-static really means (and for example not worry about
those libraries that are linked statically).  But the FC setting should
get you going.

Hope that helps.

Cheers,
Ralf

Reply via email to