libtool
[Top][All Lists]
Advanced

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

Re: How to use compiler wrappers


From: John R. Cary
Subject: Re: How to use compiler wrappers
Date: Mon, 23 Mar 2009 13:02:43 -0600
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Thanks, Ralf.

Sounds like what I am doing is at least okay, since the wrapper
just wraps the configured compiler.

But on another note, I was using

b0201.bassi$ automake --version
automake (GNU automake) 1.10.2

and it seems that --tag showed up for f77 code, but not for f90 (--tag=FC).

FYI.

Thanks...John


Ralf Wildenhues wrote:
Hello John,

* John R. Cary wrote on Sun, Mar 22, 2009 at 04:50:20PM CET:
I am in a situation where due to flakey compilers (pgi)
I had to write a compiler wrapper such that if code
does not compile, I reduce the optimization level, then
try again.

My way of dealing with this is to create a compiler
wrapper as a wrapper.sh.in file with

address@hidden@

and so forth so that at configure time it knows the real
compilers.

It's probably preferable if you use the wrapper at configure time
already, but name it strictly after the compiler, but with a suffix.
For example, name it pgf90-wrapper.  The libtool configure macros will
look for the compiler name, unfortunately.

Alternatively, ...

make CC=wrapper.sh

/bin/sh ../libtool --mode=compile /project/projectdirs/facets/cary/facetsall-franklin/physics/nubeam/par/txutils/f90 -I../../include -I ../random -I ../old_xplasma -I ../xplasma2 -I ../ezcdf -I ../pspline -I ../rfxqlo -I ../plasma_state_kernel -I ../plasma_state -I ../xstraln -O -c -o nbi_types.lo ../../nubeam/nbi_types.f90
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[2]: *** [nbi_types.lo] Error 1

From documentation I can find, I see that I need to add the
flag

AM_LIBTOOLFLAGS = --tag=FC

Will this cause problems when the directory has C or C++ code as well?

... you can use this, or simply use a more recent Automake (1.9 or
newer; 1.10.2 is current) that always adds a --tag argument by itself.

BTW, setting the tag but using different compilers at configure and at
make time can cause libtool to choose the one from configure time when
it creates shared libraries.  This may or may not be what you want.

Hope that helps.

Cheers,
Ralf






reply via email to

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