]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Add support for flang (Fortran LLVM-based) compilers
authorGilles Gouaillardet <gilles@rist.or.jp>
Thu, 24 Aug 2017 08:16:46 +0000 (17:16 +0900)
committerMike Frysinger <vapier@gentoo.org>
Sun, 14 Jan 2024 07:07:38 +0000 (02:07 -0500)
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

index 32485604e847f85ca1f4fb6651d79d9a52702a10..156efe95747cb043e8580ba151c1c9a70b822406 100644 (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*)