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.
This commit is contained in:
Gilles Gouaillardet 2017-08-24 17:16:46 +09:00 committed by Mike Frysinger
parent 533d816dea
commit 33d4b69fcc

6
m4/libtool.m4 vendored
View File

@ -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*)