[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: detection and support of OpenMP
From: |
Bruno Haible |
Subject: |
Re: detection and support of OpenMP |
Date: |
Sat, 6 Oct 2007 02:39:31 +0200 |
User-agent: |
KMail/1.5.4 |
Paul Eggert wrote:
> In reference to:
>
> http://lists.gnu.org/archive/html/autoconf-patches/2007-10/msg00017.html
>
> Bruno contributed that patch to Autoconf, dated 2007-05-21.
> Bruno, was that patch derived from Steven's work?
It was derived from these two comment lines found in Steven's macro:
# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
You find the AC_C_OPENMP history here:
http://cvs.savannah.gnu.org/viewvc/gettext/gettext-tools/m4/openmp.m4?hideattic=0&root=gettext&view=log
http://cvs.savannah.gnu.org/viewvc/gnulib/gnulib/m4/openmp.m4?view=log
http://lists.gnu.org/archive/html/autoconf/2007-05/msg00029.html
Other than the list of compilers and options to try, there are no commonalities
between http://lists.gnu.org/archive/html/autoconf/2007-05/msg00029.html
and the code Steven's AX_OPENMP macro, because
- I didn't want to try arbitrary options on arbitrary compilers, because
the option "-openmp" causes the creation of a file "penmp" with most
compilers.
- I wanted the OPENMP_FLAGS to be empty if $CC $CFLAGS already supports
OpenMP without any additional flags.
- I wanted to check the _OPENMP macro, because according to the OpenMP spec,
it is this macro which indicates OpenMP support in the compiler, not some
library function.
- The _AC_LANG_PREFIX business made Steven's code unintelligible to me
(and the quotation rules around _AC_LANG_PREFIX are still black magic to
me).
> If so, how about the following patch to the Autoconf changelog?
>
> diff --git a/ChangeLog b/ChangeLog
> index a5b43ae..0aff913 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -626,6 +626,8 @@
> * NEWS: Mention AC_C_OPENMP.
> * lib/autoconf/c.m4 (AC_C_OPENMP): New macro.
> * doc/autoconf.texi (C Compiler): Document AC_C_OPENMP.
> + Based in part on Steven G. Johnson's AX_OPENMP macro in the
> + Autoconf macro archive.
This is inaccurate. But you can write:
Based in part on Steven G. Johnson's investigations for the AX_OPENMP
macro in the Autoconf macro archive.
Bruno