From patchwork Thu Jan 18 18:25:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 25445 Received: (qmail 44259 invoked by alias); 18 Jan 2018 18:26:14 -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 40550 invoked by uid 89); 18 Jan 2018 18:26:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=colored, overboard X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jan 2018 18:26:12 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0IIJMo1111124 for ; Thu, 18 Jan 2018 13:26:10 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fjwa1u8a2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 18 Jan 2018 13:26:10 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Jan 2018 18:26:08 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 18 Jan 2018 18:26:06 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0IIQ5rR45416484; Thu, 18 Jan 2018 18:26:05 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6537F11C04C; Thu, 18 Jan 2018 18:19:48 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4510211C04A; Thu, 18 Jan 2018 18:19:48 +0000 (GMT) Received: from oc1027705133.ibm.com (unknown [9.152.212.155]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 18 Jan 2018 18:19:48 +0000 (GMT) From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] GDB testsuite: Re-enable -fdiagnostics-color=never Date: Thu, 18 Jan 2018 19:25:54 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18011818-0016-0000-0000-000005194FF9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011818-0017-0000-0000-00002855CA74 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-18_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801180244 X-IsSubscribed: yes In August 2017 the GDB test suite was changed to always add the compile option "-fdiagnostics-color=never", see: https://sourceware.org/ml/gdb-patches/2017-08/msg00150.html Since this option is not understood by rustc, a commit from 09/2017 dropped its use in that case: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5eb5f850 ("Don't use -fdiagnostics-color=never for rustc") But that change goes overboard and stops using the option for other languages as well. Thus compiler diagnostics written into gdb.log may contain colored output again. This is fixed. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_compile): Re-enable use of universal_compile_options for languages other than Rust. --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index a4bde72..7ee3a70 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3504,12 +3504,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 {} 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 {