From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 989BFC3A59E for ; Mon, 26 Aug 2019 09:18:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60EAB22CF8 for ; Mon, 26 Aug 2019 09:18:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ln1PuKtu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60EAB22CF8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jns82jwb+kqT9UqJMJJ61kdr2ANsTcLUiH2tGHww7A8=; b=Ln1PuKtuOAPiXq CJkGWNPMNNApiWHxC2hjmd3LUM64tsfyUvp7cj5K1oS0Z1d1Pb4UCXEuhgEIETr5VITs3jjVsaM3U FBT8b990e9eke0jRnmaGyPoCsiFHFe1h1jTGy/W9w8FuUkxNA7sbCYcNnuQ6TNV0Ts+e+pCPcJ4rn lgNvYxkOZG30X1MHLRai2b108J8FaYCt4ZYaSVnShCtwmuxPOhgQf7dN6MapstsVNJj2c7/DfR3D2 omvaTowt695eAAzKtjgFgn+MgoXaXEJ/ahnN9g0E5aUSvxUtpo19QtM0Eo0CP8kl2tFY0R/lzW4/O XDvWrwEsb+XPYMWCFpVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i2B8l-0003x0-2V; Mon, 26 Aug 2019 09:18:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i2B8h-0003wD-Rx for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2019 09:18:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6DC111570; Mon, 26 Aug 2019 02:18:12 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E865A3F59C; Mon, 26 Aug 2019 02:17:27 -0700 (PDT) Date: Mon, 26 Aug 2019 10:17:22 +0100 Message-ID: <86sgpomgkd.wl-maz@kernel.org> From: Marc Zyngier To: Masahiro Yamada Subject: Re: [PATCH 1/2] kbuild: change *FLAGS_.o to take the path relative to $(obj) In-Reply-To: <20190825172833.5708-1-yamada.masahiro@socionext.com> References: <20190825172833.5708-1-yamada.masahiro@socionext.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190826_021815_950913_0A6366ED X-CRM114-Status: GOOD ( 17.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, Michal Marek , linux-kbuild@vger.kernel.org, Suzuki K Poulose , Russell King , linux-kernel@vger.kernel.org, Ingo Molnar , James Morse , linux-arm-kernel@lists.infradead.org, Andy Lutomirski , "H. Peter Anvin" , Borislav Petkov , Thomas Gleixner , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 25 Aug 2019 18:28:32 +0100, Masahiro Yamada wrote: > > Kbuild provides per-file compiler flag addition/removal: > > CFLAGS_.o > CFLAGS_REMOVE_.o > AFLAGS_.o > AFLAGS_REMOVE_.o > CPPFLAGS_ > HOSTCFLAGS_.o > HOSTCXXFLAGS_.o > > The is the filename of the target without its suffix. > > This syntax comes into a trouble when two files with the same name > appear in one Makefile, for example: > > obj-y += foo.o > obj-y += dir/foo.o > CFLAGS_foo.o := > > Here, the applies to both foo.o and dir/foo.o > > The real world problem is: > > scripts/kconfig/util.c > scripts/kconfig/lxdialog/util.c > > Both files are compiled into scripts/kconfig/mconf, but only the > latter should be given with additional flags for ncurses. > > It is more sensible to use the relative path to the Makefile, like this: > > obj-y += foo.o > CFLAGS_foo.o := > obj-y += dir/foo.o > CFLAGS_dir/foo.o := > > The $* variable is replaced with the stem ('%') part in a pattern rule. > In other words, this only works for pattern rules. > > Signed-off-by: Masahiro Yamada > --- > > arch/arm/kvm/Makefile | 5 +++-- > arch/x86/entry/vdso/Makefile | 3 ++- > scripts/Makefile.host | 30 +++++++++++++++--------------- > scripts/Makefile.lib | 10 +++++----- > scripts/kconfig/Makefile | 8 ++++---- > 5 files changed, 29 insertions(+), 27 deletions(-) For the KVM/arm part: Acked-by: Marc Zyngier Thanks, M. -- Jazz is not dead, it just smells funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel