1
1

configury: add support for flang.

flang is currently not supported by libtool, so once configure has been invoked,
it is necessary to manually hack the generated libtool as described at
https://developer.arm.com/products/software-development-tools/hpc/resources/porting-and-tuning/building-openmpi-with-arm-compiler

This commit hacks the generated configure automatically in autogen.pl

The libtool patch has been submitted upstream and is available at https://savannah.gnu.org/patch/index.php?9442

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2017-08-24 17:31:10 +09:00
родитель d0e3bfe213
Коммит 6f8010c685

Просмотреть файл

@ -975,6 +975,28 @@ sub patch_autotools_output {
# Below is essentially an upstream patch for Libtool which we want
# made available to Open MPI users running older versions of Libtool
foreach my $tag (("", "_FC")) {
# We have to change the search pattern and substitution on each
# iteration to take into account the tag changing
my $search_string = '# icc used to be incompatible with GCC.\n\s+' .
'# ICC 10 doesn\047t accept -KPIC any more.\n.*\n\s+' .
"lt_prog_compiler_wl${tag}=";
my $replace_string = "# Flang compiler
*flang)
lt_prog_compiler_wl${tag}='-Wl,'
lt_prog_compiler_pic${tag}='-fPIC -DPIC'
lt_prog_compiler_static${tag}='-static'
;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
lt_prog_compiler_wl${tag}=";
push(@verbose_out, $indent_str . "Patching configure for flang Fortran ($tag)\n");
$c =~ s/$search_string/$replace_string/;
}
foreach my $tag (("", "_FC")) {
# We have to change the search pattern and substitution on each