History

objtool/klp: Only enable --checksum when needed

With CONFIG_KLP_BUILD enabled, checksums are only needed during a klp-build run. There's no need to enable them for normal kernel builds. This also has the benefit of softening the xxhash dependency.

Josh Poimboeuf committed 1 year ago

Commit 20920071 parent ee0b48f3 files · +5 −2Browse files

Showing the changes to scripts/livepatch (1 of 3 files). Show all

Unified · Split

scripts/livepatch/klp-build+4−0
@@ -489,8 +489,11 @@ clean_kernel() { · 488 unmodified lines
489489
490490 build_kernel() {
491491 local log="$TMP_DIR/build.log"
492+ local objtool_args=()
492493 local cmd=()
493494
495+ objtool_args=("--checksum")
496+
494497 cmd=("make")
495498
496499 # When a patch to a kernel module references a newly created unexported
@@ -513,6 +516,7 @@ build_kernel() { · 16 unmodified lines
513516 cmd+=("$VERBOSE")
514517 cmd+=("-j$JOBS")
515518 cmd+=("KCFLAGS=-ffunction-sections -fdata-sections")
519+ cmd+=("OBJTOOL_ARGS=${objtool_args[*]}")
516520 cmd+=("vmlinux")
517521 cmd+=("modules")
518522

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t