Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: Kevin Buettner <kevinb@redhat.com>
Subject: [PATCH 1/2] Add gdb_compile_openmp to lib/gdb.exp
Date: Thu, 22 Aug 2019 17:14:00 -0000	[thread overview]
Message-ID: <20190822171408.28271-2-kevinb@redhat.com> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2019-08-22 17:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 17:14 [PATCH 0/2] OpenMP parallel region scope tests Kevin Buettner
2019-08-22 17:14 ` [PATCH 2/2] " Kevin Buettner
2019-09-30 16:22   ` Tom Tromey
2019-11-04  4:31     ` Kevin Buettner
2019-10-02 16:52   ` Pedro Alves
2019-11-04  4:49     ` Kevin Buettner
2019-08-22 17:14 ` Kevin Buettner [this message]
2019-08-22 17:18   ` [PATCH 1/2] Add gdb_compile_openmp to lib/gdb.exp Christian Biesinger via gdb-patches
2019-08-22 17:27     ` Kevin Buettner
2019-09-07 15:51 ` [PING][PATCH 0/2] OpenMP parallel region scope tests Kevin Buettner
2019-09-28 20:10 ` [PING 2][PATCH " Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822171408.28271-2-kevinb@redhat.com \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox