Skip to content

Commit 105a36f

Browse files
committed
Merge tag 'kbuild-fixes-v6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix build error for the combination of SYSTEM_TRUSTED_KEYRING=y and X509_CERTIFICATE_PARSER=m - Fix DEBUG_INFO_SPLIT to generate debug info for GCC 11+ and Clang 12+ - Revive debug info for assembly files - Remove unused code * tag 'kbuild-fixes-v6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Makefile.debug: re-enable debug info for .S files Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT certs: make system keyring depend on built-in x509 parser Kconfig: remove unused function 'menu_get_root_menu' scripts/clang-tools: remove unused module
2 parents 23b9923 + 32ef9e5 commit 105a36f

File tree

6 files changed

+14
-20
lines changed

6 files changed

+14
-20
lines changed

certs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ config SYSTEM_TRUSTED_KEYRING
4343
bool "Provide system-wide ring of trusted keys"
4444
depends on KEYS
4545
depends on ASYMMETRIC_KEY_TYPE
46-
depends on X509_CERTIFICATE_PARSER
46+
depends on X509_CERTIFICATE_PARSER = y
4747
help
4848
Provide a system keyring to which trusted keys can be added. Keys in
4949
the keyring are considered to be trusted. Keys may be added at will

lib/Kconfig.debug

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,10 @@ config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
264264
config DEBUG_INFO_DWARF4
265265
bool "Generate DWARF Version 4 debuginfo"
266266
select DEBUG_INFO
267+
depends on !CC_IS_CLANG || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))
267268
help
268-
Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+.
269+
Generate DWARF v4 debug info. This requires gcc 4.5+, binutils 2.35.2
270+
if using clang without clang's integrated assembler, and gdb 7.0+.
269271

270272
If you have consumers of DWARF debug info that are not ready for
271273
newer revisions of DWARF, you may wish to choose this or have your

scripts/Makefile.debug

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
DEBUG_CFLAGS :=
2+
debug-flags-y := -g
23

34
ifdef CONFIG_DEBUG_INFO_SPLIT
45
DEBUG_CFLAGS += -gsplit-dwarf
5-
else
6-
DEBUG_CFLAGS += -g
76
endif
87

9-
ifndef CONFIG_AS_IS_LLVM
10-
KBUILD_AFLAGS += -Wa,-gdwarf-2
11-
endif
12-
13-
ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
14-
dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
15-
dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5
16-
DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y)
8+
debug-flags-$(CONFIG_DEBUG_INFO_DWARF4) += -gdwarf-4
9+
debug-flags-$(CONFIG_DEBUG_INFO_DWARF5) += -gdwarf-5
10+
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_AS_IS_GNU),yy)
11+
# Clang does not pass -g or -gdwarf-* option down to GAS.
12+
# Add -Wa, prefix to explicitly specify the flags.
13+
KBUILD_AFLAGS += $(addprefix -Wa$(comma), $(debug-flags-y))
1714
endif
15+
DEBUG_CFLAGS += $(debug-flags-y)
16+
KBUILD_AFLAGS += $(debug-flags-y)
1817

1918
ifdef CONFIG_DEBUG_INFO_REDUCED
2019
DEBUG_CFLAGS += -fno-var-tracking
@@ -29,5 +28,5 @@ KBUILD_AFLAGS += -gz=zlib
2928
KBUILD_LDFLAGS += --compress-debug-sections=zlib
3029
endif
3130

32-
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
31+
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
3332
export DEBUG_CFLAGS

scripts/clang-tools/run-clang-tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import argparse
1313
import json
1414
import multiprocessing
15-
import os
1615
import subprocess
1716
import sys
1817

scripts/kconfig/lkc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ bool menu_is_empty(struct menu *menu);
9898
bool menu_is_visible(struct menu *menu);
9999
bool menu_has_prompt(struct menu *menu);
100100
const char *menu_get_prompt(struct menu *menu);
101-
struct menu *menu_get_root_menu(struct menu *menu);
102101
struct menu *menu_get_parent_menu(struct menu *menu);
103102
bool menu_has_help(struct menu *menu);
104103
const char *menu_get_help(struct menu *menu);

scripts/kconfig/menu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,6 @@ const char *menu_get_prompt(struct menu *menu)
661661
return NULL;
662662
}
663663

664-
struct menu *menu_get_root_menu(struct menu *menu)
665-
{
666-
return &rootmenu;
667-
}
668-
669664
struct menu *menu_get_parent_menu(struct menu *menu)
670665
{
671666
enum prop_type type;

0 commit comments

Comments
 (0)