From: Nikolay Borisov <nborisov@suse.com>
To: Victor Erminpour <victor.erminpour@oracle.com>, clm@fb.com
Cc: josef@toxicpanda.com, dsterba@suse.com,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Use immediate assignment when referencing cc-option
Date: Wed, 17 Mar 2021 08:39:45 +0200 [thread overview]
Message-ID: <8d9d9142-ae55-c40a-5546-e1c0384641fa@suse.com> (raw)
In-Reply-To: <1615934770-395-1-git-send-email-victor.erminpour@oracle.com>
On 17.03.21 г. 0:46 ч., Victor Erminpour wrote:
> Calling cc-option will use KBUILD_CFLAGS, which when lazy setting
> subdir-ccflags-y produces the following build error:
>
> scripts/Makefile.lib:10: *** Recursive variable `KBUILD_CFLAGS' \
> references itself (eventually). Stop.
>
> Use := assignment to subdir-ccflags-y when referencing cc-option.
> This causes make to also evaluate += immediately, cc-option
> calls are done right away and we don't end up with KBUILD_CFLAGS
> referencing itself.
>
> Signed-off-by: Victor Erminpour <victor.erminpour@oracle.com>
> ---
> fs/btrfs/Makefile | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
> index b634c42115ea..3dba1336fa95 100644
> --- a/fs/btrfs/Makefile
> +++ b/fs/btrfs/Makefile
> @@ -7,10 +7,10 @@ subdir-ccflags-y += -Wmissing-format-attribute
> subdir-ccflags-y += -Wmissing-prototypes
> subdir-ccflags-y += -Wold-style-definition
> subdir-ccflags-y += -Wmissing-include-dirs
> -subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
> -subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
> -subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
> -subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
> +subdir-ccflags-y := $(call cc-option, -Wunused-but-set-variable)
> +subdir-ccflags-y := $(call cc-option, -Wunused-const-variable)
> +subdir-ccflags-y := $(call cc-option, -Wpacked-not-aligned)
> +subdir-ccflags-y := $(call cc-option, -Wstringop-truncation)
> # The following turn off the warnings enabled by -Wextra
> subdir-ccflags-y += -Wno-missing-field-initializers
> subdir-ccflags-y += -Wno-sign-compare
>
Why does this patch change only some assignments and others are left as
they were?
next prev parent reply other threads:[~2021-03-17 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 22:46 Victor Erminpour
2021-03-17 2:24 ` Anand Jain
2021-03-17 6:39 ` Nikolay Borisov [this message]
2021-03-17 8:39 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d9d9142-ae55-c40a-5546-e1c0384641fa@suse.com \
--to=nborisov@suse.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=victor.erminpour@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®