From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100249 invoked by alias); 4 Aug 2017 13:00:51 -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 100137 invoked by uid 89); 4 Aug 2017 13:00:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-it0-f53.google.com Received: from mail-it0-f53.google.com (HELO mail-it0-f53.google.com) (209.85.214.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Aug 2017 13:00:39 +0000 Received: by mail-it0-f53.google.com with SMTP id v127so7690498itd.0 for ; Fri, 04 Aug 2017 06:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=VAvetyOjRBFs94bnRU/uoEArTahISD5ooHMicKtnrDc=; b=pxPd4ijvnHGWB2ZmnKAwlZw19WkTjs4fA66WWMBlZo95yg27pGn0Su/PD2hqD6cjpQ BhWBPcw7qxjWqNSon8fgEVKmH/EjFwC5nvA2TTcTN2piWNKCwqvL5JlgyPsgLV5x3TSP Ey9OnqlFUjWRhCcJC+6vDhd9md3ambLwbW8g4h6pcXdf6aUt4PMyagUI3llPmnyHTyjq DV+dZjxR9bow4BFVyeU/j5dRP6tTRap9H0VASznzVSQlvXbTj8xWRoQ2dlllIVeKDFzd PkyMGtxsYrMaCfrdnA3S9IrRybWSOTtJ1bhYv/8fxDnM5UudeMdfxp/8HEVKhlUoZ/Ht xfkw== X-Gm-Message-State: AIVw1125/++3Hnb/yceIMKAXux8H5wNwPgo39bS1xBC6R2OXFVwxfc1P gWwFNVUtXQM23mQP X-Received: by 10.36.2.66 with SMTP id 63mr1982651itu.86.1501851633773; Fri, 04 Aug 2017 06:00:33 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id d200sm675322itc.29.2017.08.04.06.00.32 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 04 Aug 2017 06:00:33 -0700 (PDT) From: Yao Qi To: Simon Marchi Cc: Andreas Arnez , gdb-patches@sourceware.org Subject: Re: [PATCH] GDB testsuite: Suppress GCC's colored output References: <86h8xn3833.fsf@gmail.com> <3bec6ebd5ee77f9d5b134c1dda6b62ea@polymtl.ca> Date: Fri, 04 Aug 2017 13:00:00 -0000 In-Reply-To: <3bec6ebd5ee77f9d5b134c1dda6b62ea@polymtl.ca> (Simon Marchi's message of "Fri, 04 Aug 2017 14:19:44 +0200") Message-ID: <864ltn32tw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00069.txt.bz2 Simon Marchi writes: > My gcc (5.4) doesn't recognize it: > > $ gcc -fno-color-diagnostics test.c > gcc: error: unrecognized command line option =E2=80=98-fno-color-diagnost= ics=E2=80=99 > Ah, sorry. What I meant is -fdiagnostics-color=3Dnever. > It knows about -fdiagnostics-color=3Dnever 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? Yes, we can do that, but be careful on the recursive calls here. We want to pass -fdiagnostics-color=3Dnever to compiler during compilation, but we need to check whether compiler understands this option or not. When we test compiler, we may pass -fdiagnostics-color=3Dnever to compiler to try to compile something again to see if compiler understands. --=20 Yao (=E9=BD=90=E5=B0=A7)