From patchwork Mon Sep 4 05:16:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 22599 Received: (qmail 96973 invoked by alias); 4 Sep 2017 05:16:43 -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 96960 invoked by uid 89); 4 Sep 2017 05:16:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1604, H*RU:10.0.90.82, Hx-spam-relays-external:67.222.39.168, Hx-spam-relays-external:CMOut01 X-HELO: gproxy6-pub.mail.unifiedlayer.com Received: from gproxy6-pub.mail.unifiedlayer.com (HELO gproxy6-pub.mail.unifiedlayer.com) (67.222.39.168) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Sep 2017 05:16:41 +0000 Received: from CMOut01 (unknown [10.0.90.82]) by gproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id 19A6F1E080E for ; Sun, 3 Sep 2017 23:16:40 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id 5HGc1w00U2f2jeq01HGf4F; Sun, 03 Sep 2017 23:16:40 -0600 X-Authority-Analysis: v=2.2 cv=fJ5J5dSe c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=2JCJgTwv5E4A:10 a=zstS-IiYAAAA:8 a=20KFwNOVAAAA:8 a=5HwqUraYydmBqRaN9XoA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 75-166-76-94.hlrn.qwest.net ([75.166.76.94]:46592 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dojkS-003DiZ-NK; Sun, 03 Sep 2017 23:16:36 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] Don't use -fdiagnostics-color=never for rustc Date: Sun, 3 Sep 2017 23:16:30 -0600 Message-Id: <20170904051630.18976-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dojkS-003DiZ-NK X-Source-Sender: 75-166-76-94.hlrn.qwest.net (bapiya.Home) [75.166.76.94]:46592 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes I noticed that the gdb.rust tests fail because the test suite passes -fdiagnostics-color=never to rustc. This is not a recognized rustc option, and the test suite already handles passing the appropriate option to the Rust compiler. This patch fixes the problem. testsuite/ChangeLog 2017-09-03 Tom Tromey * lib/gdb.exp (gdb_compile): Don't use universal_compile_options for rust. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/gdb.exp | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c15743b..718edb8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-03 Tom Tromey + + * lib/gdb.exp (gdb_compile): Don't use universal_compile_options + for rust. + 2017-08-31 Sergio Durigan Junior * gdb.base/share-env-with-gdbserver.c: New file. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index c0ecab3..8af1b77 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3447,7 +3447,12 @@ proc gdb_compile {source dest type options} { # Add platform-specific options if a shared library was specified using # "shlib=librarypath" in OPTIONS. - set new_options [universal_compile_options] + if {[lsearch -exact $options rust] != -1} { + # -fdiagnostics-color is not a rustcc option. + } else { + set new_options [universal_compile_options] + } + set new_options {} set shlib_found 0 set shlib_load 0 foreach opt $options {