workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Joe Perches <joe@perches.com>, Jonathan Corbet <corbet@lwn.net>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Nicolas Schier <nicolas@fjasle.eu>,
	linux-doc@vger.kernel.org, workflows@vger.kernel.org
Subject: Re: [PATCH] kbuild: remove EXTRA_*FLAGS support
Date: Wed, 5 Feb 2025 13:38:17 -0700	[thread overview]
Message-ID: <20250205203817.GA2060120@ax162> (raw)
In-Reply-To: <20250205163939.3464137-1-masahiroy@kernel.org>

On Thu, Feb 06, 2025 at 01:39:38AM +0900, Masahiro Yamada wrote:
> Commit f77bf01425b1 ("kbuild: introduce ccflags-y, asflags-y and
> ldflags-y") deprecated these in 2007. The migration should have been
> completed by now.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  Documentation/dev-tools/checkpatch.rst | 18 ------------------
>  Documentation/kbuild/makefiles.rst     |  3 ---
>  scripts/Makefile.build                 |  4 ----
>  scripts/Makefile.lib                   |  5 -----
>  scripts/checkpatch.pl                  | 14 --------------
>  5 files changed, 44 deletions(-)
> 
> diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
> index abb3ff682076..76bd0ddb0041 100644
> --- a/Documentation/dev-tools/checkpatch.rst
> +++ b/Documentation/dev-tools/checkpatch.rst
> @@ -342,24 +342,6 @@ API usage
>  
>      See: https://www.kernel.org/doc/html/latest/RCU/whatisRCU.html#full-list-of-rcu-apis
>  
> -  **DEPRECATED_VARIABLE**
> -    EXTRA_{A,C,CPP,LD}FLAGS are deprecated and should be replaced by the new
> -    flags added via commit f77bf01425b1 ("kbuild: introduce ccflags-y,
> -    asflags-y and ldflags-y").
> -
> -    The following conversion scheme maybe used::
> -
> -      EXTRA_AFLAGS    ->  asflags-y
> -      EXTRA_CFLAGS    ->  ccflags-y
> -      EXTRA_CPPFLAGS  ->  cppflags-y
> -      EXTRA_LDFLAGS   ->  ldflags-y
> -
> -    See:
> -
> -      1. https://lore.kernel.org/lkml/20070930191054.GA15876@uranus.ravnborg.org/
> -      2. https://lore.kernel.org/lkml/1313384834-24433-12-git-send-email-lacombar@gmail.com/
> -      3. https://www.kernel.org/doc/html/latest/kbuild/makefiles.html#compilation-flags
> -
>    **DEVICE_ATTR_FUNCTIONS**
>      The function names used in DEVICE_ATTR is unusual.
>      Typically, the store and show functions are used with <attr>_store and
> diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
> index d36519f194dc..25e04e47faff 100644
> --- a/Documentation/kbuild/makefiles.rst
> +++ b/Documentation/kbuild/makefiles.rst
> @@ -318,9 +318,6 @@ ccflags-y, asflags-y and ldflags-y
>    These three flags apply only to the kbuild makefile in which they
>    are assigned. They are used for all the normal cc, as and ld
>    invocations happening during a recursive build.
> -  Note: Flags with the same behaviour were previously named:
> -  EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
> -  They are still supported but their usage is deprecated.
>  
>    ccflags-y specifies options for compiling with $(CC).
>  
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 993708d11874..a59650ba140b 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -20,10 +20,6 @@ always-m :=
>  targets :=
>  subdir-y :=
>  subdir-m :=
> -EXTRA_AFLAGS   :=
> -EXTRA_CFLAGS   :=
> -EXTRA_CPPFLAGS :=
> -EXTRA_LDFLAGS  :=
>  asflags-y  :=
>  ccflags-y  :=
>  rustflags-y :=
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ad55ef201aac..20d77bfd0d72 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -1,9 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0
> -# Backward compatibility
> -asflags-y  += $(EXTRA_AFLAGS)
> -ccflags-y  += $(EXTRA_CFLAGS)
> -cppflags-y += $(EXTRA_CPPFLAGS)
> -ldflags-y  += $(EXTRA_LDFLAGS)
>  
>  # flags that take effect in current and sub directories
>  KBUILD_AFLAGS += $(subdir-asflags-y)
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7b28ad331742..8f70bedc18be 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3689,20 +3689,6 @@ sub process {
>  			}
>  		}
>  
> -		if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
> -		    ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
> -			my $flag = $1;
> -			my $replacement = {
> -				'EXTRA_AFLAGS' =>   'asflags-y',
> -				'EXTRA_CFLAGS' =>   'ccflags-y',
> -				'EXTRA_CPPFLAGS' => 'cppflags-y',
> -				'EXTRA_LDFLAGS' =>  'ldflags-y',
> -			};
> -
> -			WARN("DEPRECATED_VARIABLE",
> -			     "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
> -		}
> -
>  # check for DT compatible documentation
>  		if (defined $root &&
>  			(($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2025-02-05 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 16:39 Masahiro Yamada
2025-02-05 18:40 ` Kees Cook
2025-02-05 20:38 ` Nathan Chancellor [this message]

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=20250205203817.GA2060120@ax162 \
    --to=nathan@kernel.org \
    --cc=apw@canonical.com \
    --cc=corbet@lwn.net \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=masahiroy@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=workflows@vger.kernel.org \
    /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