Commit 6c160f16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'kbuild-fixes-v6.8-2' of...

Merge tag 'kbuild-fixes-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Reformat nested if-conditionals in Makefiles with 4 spaces

 - Fix CONFIG_DEBUG_INFO_BTF builds for big endian

 - Fix modpost for module srcversion

 - Fix an escape sequence warning in gen_compile_commands.py

 - Fix kallsyms to ignore ARMv4 thunk symbols

* tag 'kbuild-fixes-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kallsyms: ignore ARMv4 thunks along with others
  modpost: trim leading spaces when processing source files list
  gen_compile_commands: fix invalid escape sequence warning
  kbuild: Fix changing ELF file type for output of gen_btf for big endian
  docs: kconfig: Fix grammar and formatting
  kbuild: use 4-space indentation when followed by conditionals
parents ddac3d8b a951884d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
# the "recursive dependency detected" error.
#
# Reading the Documentation/kbuild/Kconfig.recursion-issue-01 file it may be
# obvious that an easy to solution to this problem should just be the removal
# obvious that an easy solution to this problem should just be the removal
# of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already
# since CORE_BELL_A depends on CORE. Recursive dependency issues are not always
# so trivial to resolve, we provide another example below of practical
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ def process_line(root_directory, command_prefix, file_path):
    # escape the pound sign '#', either as '\#' or '$(pound)' (depending on the
    # kernel version). The compile_commands.json file is not interepreted
    # by Make, so this code replaces the escaped version with '#'.
    prefix = command_prefix.replace('\#', '#').replace('$(pound)', '#')
    prefix = command_prefix.replace(r'\#', '#').replace('$(pound)', '#')

    # Return the canonical path, eliminating any symbolic links encountered in the path.
    abs_path = os.path.realpath(os.path.join(root_directory, file_path))
+7 −2
Original line number Diff line number Diff line
@@ -135,8 +135,13 @@ gen_btf()
	${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
		--strip-all ${1} ${2} 2>/dev/null
	# Change e_type to ET_REL so that it can be used to link final vmlinux.
	# Unlike GNU ld, lld does not allow an ET_EXEC input.
	printf '\1' | dd of=${2} conv=notrunc bs=1 seek=16 status=none
	# GNU ld 2.35+ and lld do not allow an ET_EXEC input.
	if is_enabled CONFIG_CPU_BIG_ENDIAN; then
		et_rel='\0\1'
	else
		et_rel='\1\0'
	fi
	printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
}

# Create ${2} .S file with all symbols from the ${1} object file
+2 −11
Original line number Diff line number Diff line
@@ -48,17 +48,8 @@ ${NM} -n ${1} | sed >${2} -e "
/ __kvm_nvhe_\\$/d
/ __kvm_nvhe_\.L/d

# arm64 lld
/ __AArch64ADRPThunk_/d

# arm lld
/ __ARMV5PILongThunk_/d
/ __ARMV7PILongThunk_/d
/ __ThumbV7PILongThunk_/d

# mips lld
/ __LA25Thunk_/d
/ __microLA25Thunk_/d
# lld arm/aarch64/mips thunks
/ __[[:alnum:]]*Thunk_/d

# CFI type identifiers
/ __kcfi_typeid_/d
+6 −1
Original line number Diff line number Diff line
@@ -326,7 +326,12 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)

	/* Sum all files in the same dir or subdirs. */
	while ((line = get_line(&pos))) {
		char* p = line;
		char* p;

		/* trim the leading spaces away */
		while (isspace(*line))
			line++;
		p = line;

		if (strncmp(line, "source_", sizeof("source_")-1) == 0) {
			p = strrchr(line, ' ');
+6 −6

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

Loading