Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Kevin Buettner (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom Tromey <tromey@sourceware.org>, gdb-patches@sourceware.org
Cc: Pedro Alves <palves@redhat.com>,	Simon Marchi <simon.marchi@polymtl.ca>
Subject: [review v2] Add gdb_compile_openmp to lib/gdb.exp
Date: Sat, 09 Nov 2019 20:59:00 -0000	[thread overview]
Message-ID: <20191109205904.4AACC2816F@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1572841567000.I94048b8b0940c707ce0529a6bcfa6e4eace49101@gnutoolchain-gerrit.osci.io>

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/503
......................................................................

Add gdb_compile_openmp to lib/gdb.exp

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_compile_openmp): New proc.
	(build_executable_from_specs): Add an "openmp" option.

Change-Id: I94048b8b0940c707ce0529a6bcfa6e4eace49101
---
M gdb/testsuite/lib/gdb.exp
1 file changed, 13 insertions(+), 2 deletions(-)



diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2d395ef..1731a3e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3941,6 +3941,9 @@
 # against several different thread libraries, to see which one this
 # system has.
 proc gdb_compile_pthreads {source dest type options} {
+    if {$type != "executable"} {
+	return [gdb_compile $source $dest $type $options]
+    }
     set built_binfile 0
     set why_msg "unrecognized error"
     foreach lib {-lpthreads -lpthread -lthread ""} {
@@ -4146,6 +4149,14 @@
     }
 }
 
+# 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} {
+    lappend options "additional_flags=-fopenmp"
+    return [gdb_compile $source $dest $type $options]
+}
+
 # Send a command to GDB.
 # For options for TYPE see gdb_stdin_log_write
 
@@ -5891,7 +5902,7 @@
     }
 
     set func gdb_compile
-    set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads)$}]
+    set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads|openmp)$}]
     if {$func_index != -1} {
 	set func "${func}_[lindex $options $func_index]"
     }
@@ -5926,7 +5937,7 @@
 	    if { ! [regexp "^/" "$s"] } then {
 		set s "$srcdir/$subdir/$s"
 	    }
-	    if  { [gdb_compile "${s}" "${binfile}${i}.o" object $local_options] != "" } {
+	    if  { [$func "${s}" "${binfile}${i}.o" object $local_options] != "" } {
 		untested $testname
 		return -1
 	    }

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I94048b8b0940c707ce0529a6bcfa6e4eace49101
Gerrit-Change-Number: 503
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Buettner <kevinb@redhat.com>
Gerrit-Reviewer: Kevin Buettner <kevinb@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-MessageType: newpatchset


  parent reply	other threads:[~2019-11-09 20:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04  4:26 [review] " Kevin Buettner (Code Review)
2019-11-05 15:27 ` Tom Tromey (Code Review)
2019-11-06  0:33 ` Pedro Alves (Code Review)
2019-11-06 16:09 ` Simon Marchi (Code Review)
2019-11-06 16:19 ` Pedro Alves (Code Review)
2019-11-06 16:24 ` Pedro Alves (Code Review)
2019-11-06 16:26   ` Simon Marchi
2019-11-06 16:31     ` Pedro Alves
2019-11-06 16:28   ` Simon Marchi
2019-11-06 16:29 ` Simon Marchi (Code Review)
2019-11-06 23:05 ` Kevin Buettner (Code Review)
2019-11-08 15:06   ` Pedro Alves
2019-11-06 23:14 ` Kevin Buettner (Code Review)
2019-11-09 20:59 ` Kevin Buettner (Code Review) [this message]
2019-12-03 16:41 ` [review v2] " Pedro Alves (Code Review)
2019-12-10 22:46 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-10 22:46 ` Sourceware to Gerrit sync (Code Review)

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=20191109205904.4AACC2816F@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tromey@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