This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/2] Add gdb_compile_openmp to lib/gdb.exp
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Kevin Buettner <kevinb at redhat dot com>
- Date: Thu, 22 Aug 2019 10:14:07 -0700
- Subject: [PATCH 1/2] Add gdb_compile_openmp to lib/gdb.exp
- References: <20190822171408.28271-1-kevinb@redhat.com>
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_compile_openmp): New proc.
---
gdb/testsuite/lib/gdb.exp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index af56e8aa12..c8bca2f277 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4053,6 +4053,26 @@ proc gdb_compile_objc {source dest type options} {
}
}
+# Build an OpenMP program from SOURCE. See prefatory comment for
+# gdb_compile, above, for discussion of the parameters to this proc.
+
+proc gdb_compile_openmp {source dest type options} {
+ switch -glob [test_compiler_info] {
+ "gcc-*" {
+ if { !([istarget "*-*-cygwin*"]
+ || [istarget "*-*-mingw*"]
+ || [istarget "*-*-pe*"]) } {
+ lappend options "additional_flags=-fopenmp"
+ }
+ }
+ default {
+ # Don't know what flags to pass for this compiler
+ }
+ }
+
+ return [gdb_compile $source $dest $type $options]
+}
+
# Send a command to GDB.
# For options for TYPE see gdb_stdin_log_write
--
2.21.0