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=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 9BA60C433E0 for ; Mon, 29 Jun 2020 05:58:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 68A8A2312B for ; Mon, 29 Jun 2020 05:58:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BBl1XhG4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="BybM+kRz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68A8A2312B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pAdV8ZI6SlajAnCaxMa4VnTPVoxn5AyoT6OM9KUOyss=; b=BBl1XhG4tvnl9sVCdNsIcmlcy 4CnzYqYZr+Td8q2M6IWdQiGSiJ4vIJw7ewcTN2AkLHG6OaqzLMOvaLgWxLyC2e5lcnReqXrN5bgJC 0pb1piPVZyumlbpiMfF3DTHl3a5rKYY7/5orXp45oXND+QJPGXfI2RXjxfp8QSPJWcemvafWRK9x4 /DdSKkNCU7PbNCQbpvcmYzOoQza/F6LH3BwIwMVi5CO9h1q56DZf49rmVZN8F+a8x+6/2mjaFjbey hdDjBWWu0INCAJq7yDGS4LJ+hIfcNzo5k5k0U+TOXPNVdXiS5CQfom9OGc3jHO+csseSdJiR1bA8D JxK2vicng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpml9-0001mQ-Vv; Mon, 29 Jun 2020 05:55:16 +0000 Received: from ozlabs.org ([2401:3900:2:1::2]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpml7-0001m6-BD for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 05:55:14 +0000 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49wGsq67rhz9sQt; Mon, 29 Jun 2020 15:54:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1593410101; bh=Jh0SmCOzWGYUXyeIgZMSmN1pyztkyV9tCktpTHdG1i8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BybM+kRzXXhESpdzgGc8v3JB79Vlzk3vA79SnZQQwaV1CyaostawEhvEsPizyn5ni mjvAYZpXe9D14yRzLQkEWsiwft6LzwUmSLO89yP3t9zLEsD+h7in5CqCItOw3sUnXR XR+PrHFFIh1Ruw6CrJF20kEkaITEUNaIHZC08UfgEZ8Putxpw5kSYKPHNxeYkigt4c wbS4tjp+GQZq9Z2ufwA0RhBt6wAqdoTijQHNpLODJsGwpEFKRWcu7n9lm2IGDlK13B k9wjzdSQGsDp4Wip6l38PVkFqw/f9pFWx+EErzZH+ebnzKJZrzt962Cws7xNX2yiy3 NIHL1cwW1rRiA== From: Michael Ellerman To: Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: Re: [PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y In-Reply-To: <20200628015041.1000002-1-masahiroy@kernel.org> References: <20200628015041.1000002-1-masahiroy@kernel.org> Date: Mon, 29 Jun 2020 15:57:11 +1000 Message-ID: <87imfa8le0.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 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: Michal Marek , Yoshinori Sato , linux-sh@vger.kernel.org, Benjamin Herrenschmidt , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Steven Rostedt , Russell King , Ingo Molnar , Paul Mackerras , Sami Tolvanen , Rich Felker , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Masahiro Yamada writes: > CFLAGS_REMOVE_.o works per object, that is, there is no > convenient way to filter out flags for every object in a directory. > > Add ccflags-remove-y and asflags-remove-y to make it easily. > > Use ccflags-remove-y to clean up some Makefiles. > > Suggested-by: Sami Tolvanen > Signed-off-by: Masahiro Yamada > --- > > arch/arm/boot/compressed/Makefile | 6 +----- > arch/powerpc/xmon/Makefile | 3 +-- > arch/sh/boot/compressed/Makefile | 5 +---- > kernel/trace/Makefile | 4 ++-- > lib/Makefile | 5 +---- > scripts/Makefile.lib | 4 ++-- > 6 files changed, 8 insertions(+), 19 deletions(-) > > diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile > index 89c76ca35640..55cbcdd88ac0 100644 > --- a/arch/powerpc/xmon/Makefile > +++ b/arch/powerpc/xmon/Makefile > @@ -7,8 +7,7 @@ UBSAN_SANITIZE := n > KASAN_SANITIZE := n > > # Disable ftrace for the entire directory > -ORIG_CFLAGS := $(KBUILD_CFLAGS) > -KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) > +ccflags-remove-y += $(CC_FLAGS_FTRACE) This could be: ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) Similar to kernel/trace/Makefile below. I don't mind though. Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile > index 6575bb0a0434..7492844a8b1b 100644 > --- a/kernel/trace/Makefile > +++ b/kernel/trace/Makefile > @@ -2,9 +2,9 @@ > > # Do not instrument the tracer itself: > > +ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) > + > ifdef CONFIG_FUNCTION_TRACER > -ORIG_CFLAGS := $(KBUILD_CFLAGS) > -KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) > > # Avoid recursion due to instrumentation. > KCSAN_SANITIZE := n _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel