Skip to content

Commit e966ad0

Browse files
committed
kbuild: remove EXTRA_*FLAGS support
Commit f77bf01 ("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>
1 parent 10e9510 commit e966ad0

5 files changed

Lines changed: 0 additions & 44 deletions

File tree

Documentation/dev-tools/checkpatch.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -342,24 +342,6 @@ API usage
342342

343343
See: https://www.kernel.org/doc/html/latest/RCU/whatisRCU.html#full-list-of-rcu-apis
344344

345-
**DEPRECATED_VARIABLE**
346-
EXTRA_{A,C,CPP,LD}FLAGS are deprecated and should be replaced by the new
347-
flags added via commit f77bf01425b1 ("kbuild: introduce ccflags-y,
348-
asflags-y and ldflags-y").
349-
350-
The following conversion scheme maybe used::
351-
352-
EXTRA_AFLAGS -> asflags-y
353-
EXTRA_CFLAGS -> ccflags-y
354-
EXTRA_CPPFLAGS -> cppflags-y
355-
EXTRA_LDFLAGS -> ldflags-y
356-
357-
See:
358-
359-
1. https://lore.kernel.org/lkml/20070930191054.GA15876@uranus.ravnborg.org/
360-
2. https://lore.kernel.org/lkml/1313384834-24433-12-git-send-email-lacombar@gmail.com/
361-
3. https://www.kernel.org/doc/html/latest/kbuild/makefiles.html#compilation-flags
362-
363345
**DEVICE_ATTR_FUNCTIONS**
364346
The function names used in DEVICE_ATTR is unusual.
365347
Typically, the store and show functions are used with <attr>_store and

Documentation/kbuild/makefiles.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,6 @@ ccflags-y, asflags-y and ldflags-y
318318
These three flags apply only to the kbuild makefile in which they
319319
are assigned. They are used for all the normal cc, as and ld
320320
invocations happening during a recursive build.
321-
Note: Flags with the same behaviour were previously named:
322-
EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
323-
They are still supported but their usage is deprecated.
324321

325322
ccflags-y specifies options for compiling with $(CC).
326323

scripts/Makefile.build

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ always-m :=
2020
targets :=
2121
subdir-y :=
2222
subdir-m :=
23-
EXTRA_AFLAGS :=
24-
EXTRA_CFLAGS :=
25-
EXTRA_CPPFLAGS :=
26-
EXTRA_LDFLAGS :=
2723
asflags-y :=
2824
ccflags-y :=
2925
rustflags-y :=

scripts/Makefile.lib

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
# Backward compatibility
3-
asflags-y += $(EXTRA_AFLAGS)
4-
ccflags-y += $(EXTRA_CFLAGS)
5-
cppflags-y += $(EXTRA_CPPFLAGS)
6-
ldflags-y += $(EXTRA_LDFLAGS)
72

83
# flags that take effect in current and sub directories
94
KBUILD_AFLAGS += $(subdir-asflags-y)

scripts/checkpatch.pl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,20 +3689,6 @@ sub process {
36893689
}
36903690
}
36913691

3692-
if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
3693-
($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3694-
my $flag = $1;
3695-
my $replacement = {
3696-
'EXTRA_AFLAGS' => 'asflags-y',
3697-
'EXTRA_CFLAGS' => 'ccflags-y',
3698-
'EXTRA_CPPFLAGS' => 'cppflags-y',
3699-
'EXTRA_LDFLAGS' => 'ldflags-y',
3700-
};
3701-
3702-
WARN("DEPRECATED_VARIABLE",
3703-
"Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
3704-
}
3705-
37063692
# check for DT compatible documentation
37073693
if (defined $root &&
37083694
(($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||

0 commit comments

Comments
 (0)