override compiler, but also linker
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
override compiler, but also linker
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
override compiler, but also linker
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
support for IBM XLF 12.1 and higher
Dear all, in 2006 a fix was introduced for IBM xlf on linux (the fortran compiler), since it didn't support the -qmkshrobj flag: http://lists.gnu.org/archive/html/libtool/2006-07/msg00044.html However, xlf 12.1 and newer do support this flag. Furthermore, IBM uses the MPI-wrapper 'mpfort' instead of mpixlf on linux. I removed the separate section for xlf and added 'xlf* | mpfort*' to the section for xlc in libtool.m4. I'm sure you have a cleaner way of implementing this (if you plan to keep supporting the old IBM compilers), so I won't include a patch here. Cheers, John -- John Donners Consultant OSD SARA Computing Center Amsterdam ___ https://lists.gnu.org/mailman/listinfo/libtool