Skip to content

Commit 037fc33

Browse files
committed
kbuild: force all architectures except um to include mandatory-y
Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes the common Kbuild.asm file. Factor out the duplicated include directives to scripts/Makefile.asm-generic so that no architecture would opt out of the mandatory-y mechanism. um is not forced to include mandatory-y since it is a very exceptional case which does not support UAPI. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 7cbbbb8 commit 037fc33

File tree

29 files changed

+18
-47
lines changed

29 files changed

+18
-47
lines changed

Documentation/kbuild/makefiles.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ See subsequent chapter for the syntax of the Kbuild file.
12741274

12751275
--- 7.4 mandatory-y
12761276

1277-
mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild.asm
1277+
mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild
12781278
to define the minimum set of ASM headers that all architectures must have.
12791279

12801280
This works like optional generic-y. If a mandatory header is missing

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,9 +1098,11 @@ asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
10981098

10991099
PHONY += asm-generic uapi-asm-generic
11001100
asm-generic: uapi-asm-generic
1101-
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm
1101+
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \
1102+
generic=include/asm-generic
11021103
uapi-asm-generic:
1103-
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm
1104+
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
1105+
generic=include/uapi/asm-generic
11041106

11051107
PHONY += prepare-objtool
11061108
prepare-objtool: $(objtool_target)

arch/alpha/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generated-y += unistd_32.h

arch/arc/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generic-y += kvm_para.h
42
generic-y += ucontext.h

arch/arm/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
include include/uapi/asm-generic/Kbuild.asm
32

43
generated-y += unistd-common.h
54
generated-y += unistd-oabi.h

arch/arm64/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
include include/uapi/asm-generic/Kbuild.asm
32

43
generic-y += kvm_para.h

arch/c6x/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generic-y += kvm_para.h
42
generic-y += ucontext.h

arch/csky/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generic-y += ucontext.h

arch/h8300/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generic-y += kvm_para.h
42
generic-y += ucontext.h

arch/hexagon/include/uapi/asm/Kbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
include include/uapi/asm-generic/Kbuild.asm
2-
31
generic-y += ucontext.h

0 commit comments

Comments
 (0)