From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11156 invoked by alias); 4 Aug 2017 12:19:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10213 invoked by uid 89); 4 Aug 2017 12:19:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:880, HContent-Transfer-Encoding:8bit X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Aug 2017 12:19:51 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v74CJjnn022221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 4 Aug 2017 08:19:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 551961EA05; Fri, 4 Aug 2017 08:19:45 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id BCE621E5B1; Fri, 4 Aug 2017 08:19:44 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 04 Aug 2017 12:19:00 -0000 From: Simon Marchi To: Yao Qi Cc: Andreas Arnez , gdb-patches@sourceware.org Subject: Re: [PATCH] GDB testsuite: Suppress GCC's colored output In-Reply-To: <86h8xn3833.fsf@gmail.com> References: <86h8xn3833.fsf@gmail.com> Message-ID: <3bec6ebd5ee77f9d5b134c1dda6b62ea@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 4 Aug 2017 12:19:45 +0000 X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00068.txt.bz2 On 2017-08-04 13:06, Yao Qi wrote: > Andreas Arnez writes: > > Hi Andreas, > >> + # Stop the compiler from producing colored output. >> + setenv GCC_COLORS "" >> + > > This doesn't work for remote host. How about passing option > -fno-color-diagnostics to compiler which supports that option? Both > gcc > (4.9 and later) and clang has this option. My gcc (5.4) doesn't recognize it: $ gcc -fno-color-diagnostics test.c gcc: error: unrecognized command line option ‘-fno-color-diagnostics’ It knows about -fdiagnostics-color=never however, which clang seems to recognize as well. It would be nice however not to restrict the compiler version used for testing just for this. Can we write a small proc that checks if the compiler recognizes that flag and only include it if it does? Simon