From: Gilles Gouaillardet Date: Thu, 24 Aug 2017 08:16:46 +0000 (+0900) Subject: libtool: Add support for flang (Fortran LLVM-based) compilers X-Git-Tag: v2.5.0~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33d4b69fccbbb557c1160cc46c3d8d2f30fb8a2d;p=thirdparty%2Flibtool.git 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. --- 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*)