Using libtool even when not strictly needed

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using libtool even when not strictly needed

Thomas Jahns

I've run into the problem where a compiler we regularly use (NAG Fortran
compiler) has flag conventions that are at odds with libtool (i.e. nagfor uses
-Wc,opt to pass opt to the C compiler it uses as backend). For this reason I'd
like to add the compiler options to FCFLAGS in a form that's escaped for the
purposes of libtool, i.e. prefixed with -Xcompiler or -Xlinker.

This works well but at the moment requires me to override FCCOMPILE like this in (note the -static flag):

        $(LIBTOOLFLAGS) --mode=compile $(FC) -static $(AM_FCFLAGS) $(FCFLAGS)

This way all compilations are passed through libtool and options are subjected
consistently to the same parsing sequence. I'm not sure how this would affect
people who want to build pie executables, but that's an issue for later.

Now the question remains, since FCCOMPILE is really something that automake
ought to setup properly and corresponding to automake version, how to achieve
the same in a more robust fashion?

Regards, Thomas

smime.p7s (6K) Download Attachment