Support for Flang and ARM HPC compiler

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for Flang and ARM HPC compiler

pawel.osmialowski
Hello all,

This patch is a part of the cross-project set of patches
that soon will be sent to all of the relevant GNU Autotools
components: gnulib, autoconf, automake and libtool.

The purpose of this is to add awareness of the new LLVM Fortran
compiler (Flang) along with LLVM-derived ARM HPC Compilers.

These new compilers are recognized by their executable binary
names: flang, armflang, armclang, armclang++

Without those patches 'configure' script generates wrong set
of command-line flags.

Best regards,
Paul Osmialowski

Reply | Threaded
Open this post in threaded view
|

[PATCH] Support for Flang and ARM HPC compiler

pawel.osmialowski
From: root <[hidden email]>

Signed-off-by: Paul Osmialowski <[hidden email]>
---
 lib/autoconf/c.m4       | 7 +++++--
 lib/autoconf/fortran.m4 | 4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 6f2f5bac..4ab97b86 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -458,6 +458,9 @@ if test -z "$CC"; then
   AC_CHECK_TOOLS(CC, cl.exe)
 fi
 if test -z "$CC"; then
+  AC_CHECK_TOOL(CC, armclang)
+fi
+if test -z "$CC"; then
   AC_CHECK_TOOL(CC, clang)
 fi
 ])
@@ -707,7 +710,7 @@ if test -z "$CXX"; then
   else
     AC_CHECK_TOOLS(CXX,
    [m4_default([$1],
-       [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])],
+       [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC armclang++ clang++])],
    g++)
   fi
 fi
@@ -886,7 +889,7 @@ _AC_ARG_VAR_LIBS()dnl
 _AC_ARG_VAR_CPPFLAGS()dnl
 _AC_ARG_VAR_PRECIOUS([OBJC])dnl
 AC_CHECK_TOOLS(OBJC,
-       [m4_default([$1], [gcc objcc objc cc CC clang])],
+       [m4_default([$1], [gcc objcc objc cc CC armclang clang])],
        gcc)
 # Provide some information about the compiler.
 _AS_ECHO_LOG([checking for _AC_LANG compiler version])
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index 134bf09c..c55978d8 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -317,7 +317,9 @@ AC_DEFUN([_AC_FC_DIALECT_YEAR],
 #  ifort, previously ifc: Intel Fortran 95 compiler for Linux/x86
 #  efc: Intel Fortran 95 compiler for IA64
 #  nagfor: NAGWare Fortran 77/90/95 compiler
-m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor])
+#  flang: LLVM Fortran compiler
+#  armflang: ARM HPC Fortran compiler
+m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc armflang flang pgfortran pgf95 lf95 ftn nagfor])
 m4_define([_AC_F90_FC], [xlf90 f90 pgf90 pghpf epcf90])
 m4_define([_AC_F77_FC], [g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77])
 AC_DEFUN([_AC_PROG_FC],
--
2.11.0 (Apple Git-81)


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Support for Flang and ARM HPC compiler

Eric Blake-3
On 08/30/2017 06:55 AM, [hidden email] wrote:
> From: root <[hidden email]>

Looks like you failed to properly configure your git.

> -m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor])
> +#  flang: LLVM Fortran compiler
> +#  armflang: ARM HPC Fortran compiler
> +m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc armflang flang pgfortran pgf95 lf95 ftn nagfor])

It would be nice to wrap this to avoid a long line in the source, but
that's minor.

I'm not a fortran expert, so I can't test this, but in principle the
patch looks reasonable; and it is small enough to not need copyright
assignment.  However, I wonder if it does need mention in NEWS, so I'll
wait a bit longer before applying to see if anyone else chimes in on review.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


signature.asc (632 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Support for Flang and ARM HPC compiler

pawel.osmialowski
Hi Eric,

Thanks for your reply.

I've received "Undelivered Mail Returned to Sender" immediately after
sending this one. Therefore I've sent it once again, this time with the
right "From:" line.

Also I've sent autoconf patch to this list by mistake, please ignore it.

On 08/30/17 14:19, Eric Blake wrote:

> On 08/30/2017 06:55 AM, [hidden email] wrote:
>> From: root <[hidden email]>
>
> Looks like you failed to properly configure your git.
>
>> -m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor])
>> +#  flang: LLVM Fortran compiler
>> +#  armflang: ARM HPC Fortran compiler
>> +m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc armflang flang pgfortran pgf95 lf95 ftn nagfor])
>
> It would be nice to wrap this to avoid a long line in the source, but
> that's minor.
>
> I'm not a fortran expert, so I can't test this, but in principle the
> patch looks reasonable; and it is small enough to not need copyright
> assignment.  However, I wonder if it does need mention in NEWS, so I'll
> wait a bit longer before applying to see if anyone else chimes in on review.
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Support for Flang and ARM HPC compiler

pawel.osmialowski


On 08/30/17 14:28, Paul Osmialowski wrote:
> Hi Eric,
>
> Thanks for your reply.
>
> I've received "Undelivered Mail Returned to Sender" immediately after
> sending this one. Therefore I've sent it once again, this time with the
> right "From:" line.
>
> Also I've sent autoconf patch to this list by mistake, please ignore it.

Ok, sending things to four different lists during one single morning
ends like that. The line above was about accitently sent autoconf patch
to the gnulib list :)


>
> On 08/30/17 14:19, Eric Blake wrote:
>> On 08/30/2017 06:55 AM, [hidden email] wrote:
>>> From: root <[hidden email]>
>>
>> Looks like you failed to properly configure your git.
>>
>>> -m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc
>>> pgfortran pgf95 lf95 ftn nagfor])
>>> +#  flang: LLVM Fortran compiler
>>> +#  armflang: ARM HPC Fortran compiler
>>> +m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc
>>> armflang flang pgfortran pgf95 lf95 ftn nagfor])
>>
>> It would be nice to wrap this to avoid a long line in the source, but
>> that's minor.
>>
>> I'm not a fortran expert, so I can't test this, but in principle the
>> patch looks reasonable; and it is small enough to not need copyright
>> assignment.  However, I wonder if it does need mention in NEWS, so I'll
>> wait a bit longer before applying to see if anyone else chimes in on
>> review.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Support for Flang and ARM HPC compiler

pawel.osmialowski
In reply to this post by Eric Blake-3


On 30/08/2017 14:19, Eric Blake wrote:

> On 08/30/2017 06:55 AM, [hidden email] wrote:
>> From: root <[hidden email]>
>
> Looks like you failed to properly configure your git.
>
>> -m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor])
>> +#  flang: LLVM Fortran compiler
>> +#  armflang: ARM HPC Fortran compiler
>> +m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc armflang flang pgfortran pgf95 lf95 ftn nagfor])
>
> It would be nice to wrap this to avoid a long line in the source, but
> that's minor.
>
> I'm not a fortran expert, so I can't test this, but in principle the
> patch looks reasonable; and it is small enough to not need copyright
> assignment.  However, I wonder if it does need mention in NEWS, so I'll
> wait a bit longer before applying to see if anyone else chimes in on review.
>

Hello Eric,

Any followup for this?

Cheers,
Paul