summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-05-09 21:16:22 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-05-09 21:16:22 (GMT)
commita4adc28b0b5f601928887863effe7d808f467e33 (patch)
treee5213592b74000e5d022d72aead0220acfeebad5
parent3171447283bdba8145e41c8a2d86b486b9d4fe36 (diff)
downloadmxe-a4adc28b0b5f601928887863effe7d808f467e33.zip
mxe-a4adc28b0b5f601928887863effe7d808f467e33.tar.gz
mxe-a4adc28b0b5f601928887863effe7d808f467e33.tar.bz2
add test program for package libgomp (by Tony Theodore)
-rw-r--r--src/libgomp-test.c17
-rw-r--r--src/libgomp.mk5
2 files changed, 22 insertions, 0 deletions
diff --git a/src/libgomp-test.c b/src/libgomp-test.c
new file mode 100644
index 0000000..fbf304d
--- /dev/null
+++ b/src/libgomp-test.c
@@ -0,0 +1,17 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <omp.h>
+#include <stdio.h>
+
+int main(int argc, char* argv[])
+{
+ (void)argc;
+ (void)argv;
+
+ #pragma omp parallel
+ printf("Hello from thread %d, nthreads %d\n",
+ omp_get_thread_num(), omp_get_num_threads());
+
+ return 0;
+}
diff --git a/src/libgomp.mk b/src/libgomp.mk
index 997de0e..4206864 100644
--- a/src/libgomp.mk
+++ b/src/libgomp.mk
@@ -28,4 +28,9 @@ define $(PKG)_BUILD
--disable-shared \
LIBS='-lws2_32'
$(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '$(JOBS)' install
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libgomp.exe' \
+ -fopenmp
endef