Skip to content

Commit b9916af

Browse files
committed
Merge tag 'kbuild-fixes-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - fix scripts/config to properly handle ':' in string type CONFIG options - fix unneeded rebuilds of DT schema check rule - git rid of ordering dependency between <linux/vermagic.h> and <linux/module.h> to fix build errors in some network drivers - clean up generated headers of host arch with 'make ARCH=um mrproper' * tag 'kbuild-fixes-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: h8300: ignore vmlinux.lds Documentation: kbuild: fix the section title format um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> kbuild: fix DT binding schema rule again to avoid needless rebuilds scripts/config: allow colons in option strings for sed
2 parents 9a19562 + d945179 commit b9916af

File tree

29 files changed

+297
-228
lines changed

29 files changed

+297
-228
lines changed

Documentation/kbuild/makefiles.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,8 @@ When kbuild executes, the following steps are followed (roughly):
12411241
will be displayed with "make KBUILD_VERBOSE=0".
12421242

12431243

1244-
--- 6.9 Preprocessing linker scripts
1244+
6.9 Preprocessing linker scripts
1245+
--------------------------------
12451246

12461247
When the vmlinux image is built, the linker script
12471248
arch/$(ARCH)/kernel/vmlinux.lds is used.

arch/arc/include/asm/module.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
44
*
55
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
6-
76
*/
87

98
#ifndef _ASM_ARC_MODULE_H
@@ -19,8 +18,4 @@ struct mod_arch_specific {
1918
const char *secstr;
2019
};
2120

22-
#define MODULE_PROC_FAMILY "ARC700"
23-
24-
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
25-
2621
#endif /* _ASM_ARC_MODULE_H */

arch/arc/include/asm/vermagic.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#ifndef _ASM_VERMAGIC_H
4+
#define _ASM_VERMAGIC_H
5+
6+
#define MODULE_ARCH_VERMAGIC "ARC700"
7+
8+
#endif /* _ASM_VERMAGIC_H */

arch/arm/include/asm/module.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,6 @@ struct mod_arch_specific {
3737
struct module;
3838
u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
3939

40-
/*
41-
* Add the ARM architecture version to the version magic string
42-
*/
43-
#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
44-
45-
/* Add __virt_to_phys patching state as well */
46-
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
47-
#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
48-
#else
49-
#define MODULE_ARCH_VERMAGIC_P2V ""
50-
#endif
51-
52-
/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
53-
#ifdef CONFIG_THUMB2_KERNEL
54-
#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
55-
#else
56-
#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
57-
#endif
58-
59-
#define MODULE_ARCH_VERMAGIC \
60-
MODULE_ARCH_VERMAGIC_ARMVSN \
61-
MODULE_ARCH_VERMAGIC_ARMTHUMB \
62-
MODULE_ARCH_VERMAGIC_P2V
63-
6440
#ifdef CONFIG_THUMB2_KERNEL
6541
#define HAVE_ARCH_KALLSYMS_SYMBOL_VALUE
6642
static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)

arch/arm/include/asm/vermagic.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_VERMAGIC_H
3+
#define _ASM_VERMAGIC_H
4+
5+
#include <linux/stringify.h>
6+
7+
/*
8+
* Add the ARM architecture version to the version magic string
9+
*/
10+
#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
11+
12+
/* Add __virt_to_phys patching state as well */
13+
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
14+
#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
15+
#else
16+
#define MODULE_ARCH_VERMAGIC_P2V ""
17+
#endif
18+
19+
/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
20+
#ifdef CONFIG_THUMB2_KERNEL
21+
#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
22+
#else
23+
#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
24+
#endif
25+
26+
#define MODULE_ARCH_VERMAGIC \
27+
MODULE_ARCH_VERMAGIC_ARMVSN \
28+
MODULE_ARCH_VERMAGIC_ARMTHUMB \
29+
MODULE_ARCH_VERMAGIC_P2V
30+
31+
#endif /* _ASM_VERMAGIC_H */

arch/arm64/include/asm/module.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include <asm-generic/module.h>
99

10-
#define MODULE_ARCH_VERMAGIC "aarch64"
11-
1210
#ifdef CONFIG_ARM64_MODULE_PLTS
1311
struct mod_plt_sec {
1412
int plt_shndx;

arch/arm64/include/asm/vermagic.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/*
3+
* Copyright (C) 2012 ARM Ltd.
4+
*/
5+
#ifndef _ASM_VERMAGIC_H
6+
#define _ASM_VERMAGIC_H
7+
8+
#define MODULE_ARCH_VERMAGIC "aarch64"
9+
10+
#endif /* _ASM_VERMAGIC_H */

arch/h8300/kernel/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
vmlinux.lds

arch/hexagon/include/asm/module.h renamed to arch/hexagon/include/asm/vermagic.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
44
*/
55

6-
#ifndef _ASM_MODULE_H
7-
#define _ASM_MODULE_H
6+
#ifndef _ASM_VERMAGIC_H
7+
#define _ASM_VERMAGIC_H
88

9-
#include <asm-generic/module.h>
9+
#include <linux/stringify.h>
1010

1111
#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
1212

13-
#endif
13+
#endif /* _ASM_VERMAGIC_H */

arch/ia64/include/asm/module.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ struct mod_arch_specific {
2626
unsigned int next_got_entry; /* index of next available got entry */
2727
};
2828

29-
#define MODULE_PROC_FAMILY "ia64"
30-
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY \
31-
"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
32-
3329
#define ARCH_SHF_SMALL SHF_IA_64_SHORT
3430

3531
#endif /* _ASM_IA64_MODULE_H */

0 commit comments

Comments
 (0)