Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp313095imu; Tue, 15 Jan 2019 22:37:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vqNVCtUEtemMUkokCV5yUUWFu6SexOnESQVveWAnznrQOmLQqrJoKtDNAZGmFWN9tdJeT X-Received: by 2002:a63:7b06:: with SMTP id w6mr7408810pgc.288.1547620666576; Tue, 15 Jan 2019 22:37:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547620666; cv=none; d=google.com; s=arc-20160816; b=j3t3BaAQ00+plImZ9vmzAdOPuyQONBSDXINkqoB6R7VlDs9nHz1NSkwV2/EC1bGGtL /aMh6QuPNCXH7OJTlHqnp0ph9Eua0UKB6m1gXUBfTjRv2tAbfyaBybs3x1Vw4xroEVQW wJhClL5jY0wxTXUKhiHYU/mC5gEcDD6wF9ntt3O6Q8yrm+vFVmnQZOX/njwc9T1qZAgO wvEhcVnm4qiCOL6j78iIOUUWEP7UA34OkbPfmi0qnl5wjkGkb5HCJg8KR2QaJlL7DjQs rUaIqq6N7c7HiJAckVQUAcooVJYR7zLOcYxC8SiiG8mEo608U7raH+WLrUc0rP0BPF5u sEtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+Ze61RiBsdBzmtk92EzmbIeS1jQrq7l8HYGYF7t7VyY=; b=uiJiP27Vngdxm7VHPw4592A2KcqracQRW7iYnMAihqSRCNI6HtnE99VFa3h3MNqD/s Pmnth6y8CAPJZlOBKLdQKsQA8i061692q8nSvcxwvnyrjq/lKItFf1lYZ+Gju7NiWPSM zmk0dl+qj2RL3OlWu8Ku3sV5P93L2eIwyq0ik3eNNg3ARnVDxFcCoKJdzIx+SGbeA30c 0z02KhBAAnwxsvlpwJy//bjru2ExdsXLkgCjjENqk6KSAb906Yj8P/QGmnHjIVEARnQb 923UfGnBFGaAH/T33cu1jsBMeZloaSgrNuSqmJCjmfnhDEm5epYzYxyZkkhERt95NrGY cJmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=XWWreA+o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si5124300pgm.112.2019.01.15.22.37.28; Tue, 15 Jan 2019 22:37:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=XWWreA+o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388547AbfAORwW (ORCPT + 99 others); Tue, 15 Jan 2019 12:52:22 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:46229 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729410AbfAORwW (ORCPT ); Tue, 15 Jan 2019 12:52:22 -0500 Received: by mail-oi1-f196.google.com with SMTP id x202so2770965oif.13 for ; Tue, 15 Jan 2019 09:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Ze61RiBsdBzmtk92EzmbIeS1jQrq7l8HYGYF7t7VyY=; b=XWWreA+oVlQr9sjkK+Bu3hQBULVUOS+lHQ5hZNCCBppEiei9EmygnmGhtKiOLInyQI gsf+yQsqf58SzLWagpzdsV6UYtFLKkWvb+JJX3ZooeWYTbuKXKdh+MHtReGHZ2DeS2cH SN5OjBDPToWY5sEHocdab+PwwGma4kPw95ICgQyLgypjnYfSkjsrpvxbMXUDfatVmur0 Je/m7hY5XErEF86CX8JMNqbVbmzTnCs7Ruz393Mjj1Mizj2zvJN4Md176Ro1y/NHnVs3 dpfLBMOo+MbBdCysDrnUqiT1eR2IlvQMz9T7gjOF9H0t7g2q2nLH5/tgoHgd1emUKykH EWDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+Ze61RiBsdBzmtk92EzmbIeS1jQrq7l8HYGYF7t7VyY=; b=BxxCXW69P4UoIJW8QpWjoNatKZEoTJb5mtWrlfKmkyeuF/eDtyj75iNY4CgZ2n4KNO EWKsa6yJJKuhhLkeL1xefE1453GCt2fHSMNhKM78ZuzlaeGQ4kFypX82gnFMtASYLEbf 7bfApavL7yvXJMcu411HjkmKOEZBEngh9B3QXWiP2+BVlZN1HwwCr2vxDqb2q96jBm+m 7VhHvDZkFsF582nohY4Vqbk/B/945qQKXwm+FlvmJBT/NHl/Nl+fKgvznodeKnqeRwOz QezCw/LP6kcWRiU/TqVjXcn+nf9acZuCcTDzmZqx7JW1laZfjrp5+22cYB+qFCK0ngsV U0MA== X-Gm-Message-State: AJcUuke9wdwG1hMZIW8gt+DLwlyjdORhIFd8fvPDxA2YpRMUFFtjDCMC kKNOJs6V2y02t8o7DygrRb09N6rLNp3BFjATMUlc4A== X-Received: by 2002:aca:f044:: with SMTP id o65mr940657oih.145.1547574741306; Tue, 15 Jan 2019 09:52:21 -0800 (PST) MIME-Version: 1.0 References: <20190114210426.177543-1-trong@android.com> <20190114210426.177543-5-trong@android.com> In-Reply-To: From: Tri Vo Date: Tue, 15 Jan 2019 09:52:10 -0800 Message-ID: Subject: Re: [PATCH 4/4] gcov: clang: pick GCC vs Clang format depending on compiler To: Masahiro Yamada Cc: oberpar@linux.ibm.com, Greg Hackmann , Nick Desaulniers , Linux Kernel Mailing List , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 14, 2019 at 5:25 PM Masahiro Yamada wrote: > > On Tue, Jan 15, 2019 at 6:07 AM Tri Vo wrote: > > > > Clang gcov format is only supported by Clang compiler, and Clang > > compiler only supports Clang format. > > > If so, what is the point of putting GCOV_FORMAT_CLANG into the > choice menu? > > > You can choose the format only when you are using GCC. > > I think the following is more sensible: > > > if GCOV_KERNEL > > config GCOV_PROFILE_ALL > .... > > > choice > prompt "Specify GCOV format for GCC" > depends on CC_IS_GCC > ... > > config GCOV_FORMAT_3_4 > bool "GCC 3.4 format" > depends on GCC_VERSION < 40700 > ... > > config GCOV_FORMAT_4_7 > bool "GCC 4.7 format" > ... > > endchoice > > > config GCOV_FORMAT_CLANG > def_bool CC_IS_CLANG > > endif > > > > > > Or, you can delete GCOV_FORMAT_CLANG > if you write the Makefile like follows: > > > > obj-y := base.o fs.o > obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_base.o gcc_3_4.o > obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_base.o gcc_4_7.o > obj-$(CONFIG_CC_IS_CLANG) += clang.o Thanks for the suggestion! It is more sensible than the current approach. I'll send an update.