Commit Graph

6 Commits

Author SHA1 Message Date
Joe Lawrence 934b3b3c0c kpatch-build: ignore init/version-timestamp.o
Kernel v6.1+ commit 2df8220cc511 ("kbuild: build init/built-in.a just
once") split init_uts_ns and linux_banner out to
init/version-timestamp.c from init/version.c

Add init/version-timestamp.o to the list of object files that kpatch-cc
won't add to its changed_objs list.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2023-01-16 09:33:55 -05:00
Josh Poimboeuf 042cde03b3 kpatch-build: fix "make check"
For some reason the github version of 'make check' just started
complaining about these:

shellcheck kpatch/kpatch kpatch-build/kpatch-build kpatch-build/kpatch-cc

In kpatch-build/kpatch-build line 455:
	while [[ "${filedir#$common/}" = "$filedir" ]]; do
                            ^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
	while [[ "${filedir#"$common"/}" = "$filedir" ]]; do

In kpatch-build/kpatch-build line 460:
	result="${result}${filedir#$common/}"
                                   ^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
	result="${result}${filedir#"$common"/}"

In kpatch-build/kpatch-cc line 26:
			relobj=${obj##$KPATCH_GCC_SRCDIR/}
                                      ^----------------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
			relobj=${obj##"$KPATCH_GCC_SRCDIR"/}

For more information:
  https://www.shellcheck.net/wiki/SC2295 -- Expansions inside ${..} need to b...
make: *** [Makefile:70: check] Error 1
Error: Process completed with exit code 2.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-11-30 19:04:23 -08:00
Josh Poimboeuf 1ead10d2b2 kpatch-cc: Add more file ignores
These files aren't in the kernel proper, and can be ignored.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-10-12 16:55:31 -07:00
Johannes Erdfelt 07433e98c0 kpatch-cc: fix stripping of source tree prefix
To support building out-of-tree kernel modules, the source tree prefix
is attempted to be stripped from change object file paths to make them
relative. However, if the path is already relative, the change can
strip a substring instead, resulting in build errors.

Ensure just the prefix is stripped instead of any substring.

Fixes: #1282
Fixes: 51a8fad34f ("Add support for building out-of-tree modules")
2022-07-27 10:29:36 -07:00
Sumanth Korikkar eb4a85f778 kpatch/s390: Add exclusion lists
Add object exclusion for s390

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
2022-05-20 15:50:29 +02:00
Artem Savkov 41de9e763a kpatch-build: clang support
Add support for clang-built kernels. This is completely automatic, we
check if the kernel was built with clang by looking for
CONFIG_CC_IS_CLANG in config.

This has almost no effect on non-clang built kernels with one exception:
we now do compliler checks _after_ we download kernel sources which is a
waste of resources in case when compilers don't match.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-02-17 12:59:51 +01:00