[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openmp: add workaround for 32-bit programs on AIX
From: |
Bruno Haible |
Subject: |
Re: openmp: add workaround for 32-bit programs on AIX |
Date: |
Sat, 13 Apr 2019 11:04:30 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; ) |
> 2019-04-09 Bruno Haible <address@hidden>
>
> openmp: Add workaround for 32-bit programs on AIX.
> * lib/omp.in.h: New file.
> * lib/omp-init.c: New file, based on lib/nproc.c.
> * m4/omp_h.m4: New file.
> * modules/openmp (Files): Add them.
> (Depends-on): Add include_next, c-ctype, setenv.
> (configure.ac): Invoke gl_OMP_H.
> (Makefile.am): Add rules to create omp.h and compile omp-init.c.
> (Include): Mention <omp.h>.
It is in fact better to put this initialization function into a separate
module. So that I can put this function into a shared library that does not
depend on libgomp, and have only the executables that need OpenMP depend on
libgomp.
2019-04-13 Bruno Haible <address@hidden>
openmp-init: New module.
* modules/openmp-init: New file.
* modules/openmp: (Files, Depends-on, configure.ac, Makefile.am): Revert
the changes from 2019-04-09.
diff --git a/modules/openmp b/modules/openmp
index ef8e605..7c627ed 100644
--- a/modules/openmp
+++ b/modules/openmp
@@ -2,38 +2,13 @@ Description:
Detection of OpenMP support.
Files:
-lib/omp.in.h
-lib/omp-init.c
-m4/omp_h.m4
Depends-on:
-include_next
-c-ctype
-setenv
configure.ac:
AC_OPENMP
-gl_OMP_H
Makefile.am:
-BUILT_SOURCES += omp.h
-
-# We need the following in order to create <omp.h> when the system
-# doesn't have one that works with the given compiler.
-omp.h: omp.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
- $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f address@hidden $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_OMP_H''@|$(NEXT_OMP_H)|g' \
- < $(srcdir)/omp.in.h; \
- } > address@hidden && \
- mv address@hidden $@
-MOSTLYCLEANFILES += omp.h omp.h-t
-lib_SOURCES += omp-init.c
Include:
#ifdef _OPENMP
diff --git a/modules/openmp-init b/modules/openmp-init
new file mode 100644
index 0000000..e3975ca
--- /dev/null
+++ b/modules/openmp-init
@@ -0,0 +1,47 @@
+Description:
+Initialization of OpenMP support.
+
+Files:
+lib/omp.in.h
+lib/omp-init.c
+m4/omp_h.m4
+
+Depends-on:
+include_next
+c-ctype
+setenv
+
+configure.ac:
+gl_OMP_H
+
+Makefile.am:
+BUILT_SOURCES += omp.h
+
+# We need the following in order to create <omp.h> when the system
+# doesn't have one that works with the given compiler.
+omp.h: omp.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f address@hidden $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_OMP_H''@|$(NEXT_OMP_H)|g' \
+ < $(srcdir)/omp.in.h; \
+ } > address@hidden && \
+ mv address@hidden $@
+MOSTLYCLEANFILES += omp.h omp.h-t
+
+lib_SOURCES += omp-init.c
+
+Include:
+#ifdef _OPENMP
+# include <omp.h>
+#endif
+
+License:
+LGPL
+
+Maintainer:
+all