Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp754090pxb; Thu, 21 Oct 2021 08:52:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOyvuZskeKCUgjDERW2bZyOpxWKNpcN+1m5nisMguKPCgmV5NU74rgcTbrglLi/mbaPeTB X-Received: by 2002:a05:6402:3588:: with SMTP id y8mr8437168edc.285.1634831556414; Thu, 21 Oct 2021 08:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634831556; cv=none; d=google.com; s=arc-20160816; b=L6GZklk87BJQ+PAdhlukasosEO/yzC3W7BG+tIeXM7beM4U9SE1WIuy13pCW59M/MU ASU/P3Z5/Zt0/NxX09Ae2yJWrmoFJvOPtcSDL7KG2jgYb9+UFxtpDl6ncx1h/noj5a9O LyOujAod32DvV5ZHdsajbqN1PGKJsgcuzwt8oeGhbr9RspmKgBWM+Dg+doWNTgEb2Mqd km3Tml9O+R94uoC/gyvr5bGaWjE9eb/B4EkTJQXgF2A325fof3dda1mc3XEydFMQlp/1 4xDjypXD80VdpauWaGEeDw+WVhZtZUdEj8funvGCi/1qf8YWBnHQ5+ooq+4vBoHap22N 1aXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=dy/KzsQz2lEJJdZJA4KNskQQMbewseVUgMKmV1MPvqs=; b=C1zAmXEU4q49QMc/uEHBAJeED/r1FMYf66FmHooE4lo2ST5wwNL6qJGGKpEsCLggtP XE5EQfXSX6D25j7qUAoukg+TxFpeDH8xYPWiJh6dhGCcspzJA4CeQb4SA8Ddh6WQTwQT J+/y0njjxC6oXuAaLkbLJXoLJRgwc4yQcAXKFJKrqOsAxsMbTmdzN4ZgL8cinrlOli/H +AzBN1EVz7JnWPMXwleYS8KqkCSuXNQbN5cc6tuibBXL+/mvBhrfLV+FIhRQvC22ecUk pA+z/ROhGVq6QGk6V4tG/E1fwdKS/gPiLirhkq56zuuQd66yyd4h8Fsz3e9xlXq5xPaM 2NFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr10si13026199ejc.289.2021.10.21.08.52.12; Thu, 21 Oct 2021 08:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbhJUPwh (ORCPT + 99 others); Thu, 21 Oct 2021 11:52:37 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:4018 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbhJUPwe (ORCPT ); Thu, 21 Oct 2021 11:52:34 -0400 Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HZsK54kcGz67wr9; Thu, 21 Oct 2021 23:46:17 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 21 Oct 2021 17:50:10 +0200 Received: from [10.202.227.179] (10.202.227.179) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 21 Oct 2021 16:50:10 +0100 Subject: Re: [PATCH v2 2/2] perf jevents: Enable warnings through HOSTCFLAGS To: Jiri Olsa CC: , , , , , , , , , , References: <1634807805-40093-1-git-send-email-john.garry@huawei.com> <1634807805-40093-3-git-send-email-john.garry@huawei.com> From: John Garry Message-ID: Date: Thu, 21 Oct 2021 16:50:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.179] X-ClientProxiedBy: lhreml717-chm.china.huawei.com (10.201.108.68) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2021 13:48, Jiri Olsa wrote: >> +HOSTCFLAGS += -Wall >> +HOSTCFLAGS += -Wextra >> + >> # Enforce a non-executable stack, as we may regress (again) in the future by >> # adding assembler files missing the .GNU-stack linker note. >> LDFLAGS += -Wl,-z,noexecstack >> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf >> index 7df13e74450c..118bcdc70bb4 100644 >> --- a/tools/perf/Makefile.perf >> +++ b/tools/perf/Makefile.perf >> @@ -226,7 +226,7 @@ else >> endif >> >> export srctree OUTPUT RM CC CXX LD AR CFLAGS CXXFLAGS V BISON FLEX AWK >> -export HOSTCC HOSTLD HOSTAR >> +export HOSTCC HOSTLD HOSTAR HOSTCFLAGS >> >> include $(srctree)/tools/build/Makefile.include >> >> diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build >> index a055dee6a46a..d5c287f069a2 100644 >> --- a/tools/perf/pmu-events/Build >> +++ b/tools/perf/pmu-events/Build >> @@ -1,7 +1,7 @@ >> hostprogs := jevents >> >> jevents-y += json.o jsmn.o jevents.o >> -HOSTCFLAGS_jevents.o = -I$(srctree)/tools/include >> +HOSTCFLAGS_jevents.o = -I$(srctree)/tools/include $(HOSTCFLAGS) > so the the host cflags are made of: > > host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(KBUILD_HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj)) > > can't you use KBUILD_HOSTCFLAGS? Maybe. However, it seems to be empty when building perf/pmu-events. Even in building tools/objtool - which currently references it - it is empty AFAICS. I'm not sure if it's being imported properly. Thanks, John > > also perhaps we could rename KBUILD_HOSTCFLAGS to HOSTCFLAGS? > the name seems like leftover from kbuild move