From 33d4b69fccbbb557c1160cc46c3d8d2f30fb8a2d Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 24 Aug 2017 17:16:46 +0900 Subject: [PATCH] libtool: Add support for flang (Fortran LLVM-based) compilers This patch adds support for flang compilers. Some specific flags are needed so these compilers must be handled in a specific way. By default, the compiler is called 'flang', but ARM releases their own flang-based compiler called 'armflang'. Because of the current lack of flang support in libtool, the generated 'libtool' must be manually modified after 'configure' is invoked. Such a process is for example described on ARM web site (it involves the Open MPI library). Url: https://savannah.gnu.org/patch/?9442 * m4/libtool.m4: Handle *flang. --- m4/libtool.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 32485604e..156efe957 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -4712,6 +4712,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + *flang) + # Flang compiler. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) -- 2.47.3