From patchwork Thu Aug 22 17:14:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 34248 Received: (qmail 28695 invoked by alias); 22 Aug 2019 17:14:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28613 invoked by uid 89); 22 Aug 2019 17:14:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Aug 2019 17:14:33 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CCE6307D915 for ; Thu, 22 Aug 2019 17:14:32 +0000 (UTC) Received: from f30-1.lan (ovpn-117-6.phx2.redhat.com [10.3.117.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04B8E5C226; Thu, 22 Aug 2019 17:14:31 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Kevin Buettner Subject: [PATCH 1/2] Add gdb_compile_openmp to lib/gdb.exp Date: Thu, 22 Aug 2019 10:14:07 -0700 Message-Id: <20190822171408.28271-2-kevinb@redhat.com> In-Reply-To: <20190822171408.28271-1-kevinb@redhat.com> References: <20190822171408.28271-1-kevinb@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes 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