Dear all,
I'm having some trouble with building a large software
package using libtool. It consists of many smaller libraries,
of which only one uses MPI for parallel processing.
I only want to use the MPI-compiler wrappers for this one,
but this is difficult with one libtool for the whole project.
The important section in libtool is:
# ### BEGIN LIBTOOL TAG CONFIG: FC
...
# A language specific compiler.
CC="ifort"
...
archive_cmds="\$CC -shared -nofor_main \$libobjs \$deplibs
\$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
...
I can override the compiler by setting FC=mpif90 in the Makefile, so then it
calls libtool as follows:
/bin/sh ../../../../../../libtool --tag=FC --mode=link mpif90 ...
libtool: link: mpif90 -shared -nofor_main ...
Unfortunately, this does not override the compiler used in the
linker-command:
/bin/sh ../../../../../../libtool --tag=FC --mode=link mpif90 ...
libtool: link: ifort -shared -nofor_main ...
Apparently, it keeps using the CC as defined in the selected section in
libtool.
I solved the problem temporarily with the following change in libtool:
archive_cmds="\${FC:-\$CC} -shared -nofor_main \$libobjs \$deplibs
\$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
which uses the correct linker command, both with and without setting FC.
But I guess there is a more appropriate (and permanent) way of doing this.
I hope you could help me with some suggestions.
Cheers,
John
--
John Donners
Consultant
OSD
SARA
Science Park 140
1098 XG Amsterdam
T +31 (0)20 592 3055
F +31 (0)20 668 3167
M +31 (0)6 1903 9023
E john.donn...@sara.nl
www.sara.nl
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool