]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
kbuild: remove EXTRA_*FLAGS support
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 5 Feb 2025 16:39:38 +0000 (01:39 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 15 Mar 2025 12:16:21 +0000 (21:16 +0900)
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: Kees Cook <kees@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Documentation/dev-tools/checkpatch.rst
Documentation/kbuild/makefiles.rst
scripts/Makefile.build
scripts/Makefile.lib
scripts/checkpatch.pl

index abb3ff6820766ee0c29112b256bcc44ce41fffba..76bd0ddb004161a850b753724fb7d2d4cf9cb971 100644 (file)
@@ -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
index d36519f194dc0d18b72a6f3ce7f3649f7c1b5637..25e04e47fafff6b27cc0283a1d08e4e60c8fbc9a 100644 (file)
@@ -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).
 
index 993708d1187459f3678d68ec81ef005e6f51d470..a59650ba140bd5f93dfd950b0502cbe79fd50cf0 100644 (file)
@@ -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 :=
index cad20f0e66ee9cf5942b51f37cdd8e52802493e4..47f56ef719372b9d1735fe08001eb839c82c91dd 100644 (file)
@@ -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)
index 7b28ad3317427a6bf9e27b77065aa3915cb13053..8f70bedc18be5916138253a85313ae40a4c059a8 100755 (executable)
@@ -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*\"/) ||