Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1303369imm; Wed, 17 Oct 2018 17:38:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61tR/zFgKFmjadj6Sjp2o/TFiG7GGZZy4GnDcSYi+wMES5KTsqI9AYmJWz8iA3dOBZP5E+a X-Received: by 2002:a63:c044:: with SMTP id z4-v6mr26169895pgi.274.1539823136052; Wed, 17 Oct 2018 17:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539823136; cv=none; d=google.com; s=arc-20160816; b=I1QONoj+GibsGfx1tXwhf+9ztRMpammfQNQDEpUUX3qg4xxxp9GG+lItg0T4x+S6Ik NPLhIyy3TzxBCpmbUq1ECNICVvEBAr5Q2PHkFYHE3Ly4kwayDrd9PZAXaczt72eYy4v9 hZpM2pcd9Iw6I1Uv5tYKkSh8akyFfulqLXSzC3hQfygPZLXgCtNGHUD5SB7jhipKY8SE r4tYo6ThEXjCBBWdEgWbARJVu16Np+VfChFWXuDxF8dh5PJKYGbhZZj2OkxM6JHj0wyd bpBiayKWaord+KCQpys4z/rQ+0F1uMor/rqTKO0tep0y8acLq7AEknGnFg8zN6DGwCUY LdHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2PL4hFv0GE0rxeKh7sQXxDq7sromb5wbNNXMy5vuzHs=; b=YGksWtcrijBvE5a1Lt74IVFhCM5dgX+GmDT6542F9RLCqH8h99yM7MHESbKEzdJ9f1 3iwrvQ2G838E8sUZFZitJfpX2uiW7QbnmvowG50qkdesULuTvac1s43M7PCGY60vB8OS i4+Ss+27MGajAe5mkruU65g63LjMnldQAjYAJrMGUW/rX5vApeFf92+21ga6cHN4mZfB P1NR2Qx1/nJUkQR2lsc6Qph0xHTQ8W9NWo9+3gswx7+YZVLenHj52fk2iG6Qo6OB60l1 e1D7ZM4JTq0ZZHqsiZn3WRVvZTn/mK236FCwKU77t4C4l36efTbjQtUTx0sugQMy3WZB UwOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="S/xntCYl"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si18958641pgg.216.2018.10.17.17.38.37; Wed, 17 Oct 2018 17:38:56 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b="S/xntCYl"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbeJRIfH (ORCPT + 99 others); Thu, 18 Oct 2018 04:35:07 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:32827 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeJRIfH (ORCPT ); Thu, 18 Oct 2018 04:35:07 -0400 Received: by mail-ot1-f65.google.com with SMTP id q50so28135009otd.0; Wed, 17 Oct 2018 17:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2PL4hFv0GE0rxeKh7sQXxDq7sromb5wbNNXMy5vuzHs=; b=S/xntCYlsnBxx9ryB/NsyXw8/oeDFgHzNVK+lJ++0/5MDJX78G6W/Z3wZRYuLqUggR aDHKL7i4ISJx7cVLZETciX4DjXAljjDwESPHkbY1guZe2lErTqPvvYDeO++P3xz0gsgI bFrAIyLEMpuwnybAuGFr5s/CIeFCFKPL1eT9eFuNC3PGYu92S5BHDpxT/vLd+N+tzgPS ZEfQhV2ZeSOdiXaRcr3QOL/7TlI7gS2nE9cXfMW6h0PkaOPk46QaPY3ZhLUUjgeQ6FFU emO45VWYHEpN4gV1pmf12hLTIuwTA0c6HrZtO6gH9I5HD2geF6nXsymX3+o/0XbxluHx k9eA== 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:content-transfer-encoding; bh=2PL4hFv0GE0rxeKh7sQXxDq7sromb5wbNNXMy5vuzHs=; b=HQwRmoVTkxE84IXN7sQgyyxG9P6q4/6jvbg2OqskLyc8DYYmyP/mRSytlWYj28Q039 LL7C6YQFGJSnBD0EMRpUU1N1lb1ZyTdgo/5igMk2pzzGuSRYO6z1c8Ow2HQnlsScThT2 iUQX3+GOHI46qCrT2ymnJxdJsvT3vYnFV6BBP4S6WZZgLOITlYAE0xnrUIUsy35PuVvZ yDw7L4ygd2g4y54JDQr9EaT5fy9Jox+S4IRHn0yyWLv2Q1i3+7dFpTNtPijTu/NlisOm b9AN7kO+4sGozED2UB9ZcYeH2RuI4696fgpkR7ZWonnsasATXFalCd0xXA5bMEv5NPXT 7IJw== X-Gm-Message-State: ABuFfojh0hGnKNHSYfSfQ+Bm3B2PEWFT2pKdmR8BdvgZfbSutw8A5C0Y 0M4I29ZwhPGN9ErbN2CYizWg9gHrVqK0Y0JbIm0= X-Received: by 2002:a9d:2568:: with SMTP id j37mr19054980otd.263.1539823010099; Wed, 17 Oct 2018 17:36:50 -0700 (PDT) MIME-Version: 1.0 References: <20181017000809.GA21292@WindFlash> <20181017081115.GA22535@zn.tnic> In-Reply-To: From: Leonardo Bras Date: Wed, 17 Oct 2018 21:36:38 -0300 Message-ID: Subject: Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS To: Masahiro Yamada Cc: Borislav Petkov , lkcamp@lists.libreplanetbr.org, Matthew Wilcox , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Michal Marek , linux-kernel , linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 17, 2018 at 5:21 AM Masahiro Yamada wrote: > > On Wed, Oct 17, 2018 at 5:11 PM Borislav Petkov wrote: > > > > On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Br=C3=A1s wrote: > > > Adds -Wshadow=3Dlocal on KBUILD_HOSTCFLAGS to show shadow warnings > > > on tools built for HOST. > > > > > > Signed-off-by: Leonardo Br=C3=A1s > > > --- > > > Makefile | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/Makefile b/Makefile > > > index e8b599b4dcde..fb0a9ac195e7 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -360,7 +360,7 @@ HOST_LFS_LIBS :=3D $(shell getconf LFS_LIBS 2>/de= v/null) > > > > > > HOSTCC =3D gcc > > > HOSTCXX =3D g++ > > > -KBUILD_HOSTCFLAGS :=3D -Wall -Wmissing-prototypes -Wstrict-prototy= pes -O2 \ > > > +KBUILD_HOSTCFLAGS :=3D -Wall -Wshadow=3Dlocal -Wmissing-prototypes= -Wstrict-prototypes -O2 \ > > > -fomit-frame-pointer -std=3Dgnu89 $(HOST_LFS_CFLAGS) \ > > > $(HOSTCFLAGS) > > > KBUILD_HOSTCXXFLAGS :=3D -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) > > > -- > > > > You might wanna take a look at scripts/Makefile.extrawarn which already > > has -Wshadow. > > > scripts/Makefile.extrawarn provides options for the target compiler (CC), > whereas this patch adds -Wshadow=3Dlocal for the host compiler (HOSTCC). > > Thanks for helping, :) Leonardo Bras > > -- > Best Regards > Masahiro Yamada