Synchronize OpenMP flags with AC_OPENMP
Christian Feld <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.patches |
|---|---|
| Message-ID | <[email protected]> |
Dear all, the attached patch synchronizes the OpenMP flags detected in AC_OPENMP with the flags that libtool 'func_append's to compiler_flags compile_command finalize_command new_inherited_linker_flags and prepends to compile_deplibs finalize_deplibs The patch includes -qopenmp (Intel) and -Kopenmp (Fujitsu) proposed to AC_OPENMP, see [1][2], and uses just -homp for Cray, see [3]. It would be nice if this patch could make it upstream. Thanks, Christian [1] https://lists.gnu.org/archive/html/autoconf-patches/2014-11/msg00001.html [2] https://lists.gnu.org/archive/html/autoconf-patches/2013-11/msg00000.html [3] https://lists.gnu.org/archive/html/libtool/2016-09/msg00001.html -- Dipl-Phys. Christian Feld Forschungszentrum Jülich GmbH Jülich Supercomputing Centre Telefon: +49 2461 61-1773 E-Mail: [email protected] Internet: http://www.fz-juelich.de/jsc ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------
openmp_flags.diff
(text/x-diff, 1015 B)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 4cd3818..d7d9f8b 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5175,7 +5175,8 @@ func_mode_link ()
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*|-qopenmp|-homp \
+ |-Popenmp|--openmp|-Kopenmp)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -5713,7 +5714,8 @@ func_mode_link ()
found=false
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*|-qopenmp|-homp \
+ |-Popenmp|--openmp|-Kopenmp)
if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"