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,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 729DDC433DF for ; Tue, 30 Jun 2020 02:11:47 +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 3FD4F2068F for ; Tue, 30 Jun 2020 02:11:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XVKKWQna"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="XBPAVQ+D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FD4F2068F 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+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:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yFBeUM41FjR5s0XNjLtuLRsuNH3UBnEL1cjzCaHiyIw=; b=XVKKWQnaZi53NkSca/96Exr6N zTx+MA5KJSUB0wlTrfXvLqq0JGbwMo4S14husYHKOs1XPWproe0XRyWNFCnOLYchj+54tsAr+J3+b RajHnAgxBDFYrfkNX6B//oyst87yHO6unjeAwRJ6NjUTyngsalBzksGX8uNGCkughX95cjjpEG5oN jxuS5u0M5NShBo4+sv6XIQVcZoAskqwQRoZ0+7Ox025Xl76dH55PQhrbRp0KrRcDyNAJKqf1oEO3i +apiDsClMOsb6B1fDkpBk2Lv84vs157iytPRrRgQz0TAE+YDKtv7zK29fO9qNS9WKJAnFxldQ0CTK CgtlBiWHQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq5hp-0000So-A6; Tue, 30 Jun 2020 02:09:05 +0000 Received: from conssluserg-03.nifty.com ([210.131.2.82]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq5hm-0000SK-4S for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2020 02:09:03 +0000 Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 05U28iLh032551 for ; Tue, 30 Jun 2020 11:08:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 05U28iLh032551 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1593482925; bh=8N9eJ+P9q8UjGmkozh+JC0/G8Gi+VtjTGyH41GDG7qQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XBPAVQ+D67fSeXqHbyyQDokt++S37hhSVW07zeWlL1772G3Pck6+8PzK+i0hf5ZW9 V2LI1trmHpPAJUoeSVpVWzMD5g7oJwbPUiOitRvoNTmUtdWzNvmjyxz2wOaMuyUawF x6w5Y+wMvOIxMl++zTr6sNqmjiUt92Ndp8z1fyFkpmZnqJSY+aFffMfFb2dPJCebDO f3DRiKWYIHuVPb2l3VNLMOEKcry29/159EG4Ai8XlOlrjOARaHR7cuZt54YkRajrvx StoLhTChVQmh/pYjD8ETWkmixOig+IACKG0GBz/PuSQSZtoyQFVQlI6RqCv3zj6ONM gyOCR7S3+nSZA== X-Nifty-SrcIP: [209.85.222.51] Received: by mail-ua1-f51.google.com with SMTP id b13so5989703uav.3 for ; Mon, 29 Jun 2020 19:08:44 -0700 (PDT) X-Gm-Message-State: AOAM530jpRsswndfckBJVqntgH95v/+pcTZheKSArIaCiefcnfhhzIQF LqROyCRlES2oBkGie3ztdr2+wRm4MDsnOejFIk8= X-Google-Smtp-Source: ABdhPJzcTgvLU2AmkLENvHvRyD/efC2ONPJPB6N+NNMxQ+AWnRagsj4cZe5ewXyAh5Ardq+OWABinNwy06jhD+SST0c= X-Received: by 2002:a9f:2204:: with SMTP id 4mr13210692uad.40.1593482923565; Mon, 29 Jun 2020 19:08:43 -0700 (PDT) MIME-Version: 1.0 References: <20200628015041.1000002-1-masahiroy@kernel.org> <87imfa8le0.fsf@mpe.ellerman.id.au> In-Reply-To: <87imfa8le0.fsf@mpe.ellerman.id.au> From: Masahiro Yamada Date: Tue, 30 Jun 2020 11:08:07 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y To: Michael Ellerman 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 Kbuild mailing list , Benjamin Herrenschmidt , Linux-sh list , Linux Kernel Mailing List , Steven Rostedt , Russell King , linuxppc-dev , Ingo Molnar , Paul Mackerras , Sami Tolvanen , Rich Felker , linux-arm-kernel 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 On Mon, Jun 29, 2020 at 2:55 PM Michael Ellerman wrote: > > 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 fixed it up, and applied to linux-kbuild. Thanks. > 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 -- Best Regards Masahiro Yamada _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel