aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/linux.go
diff options
context:
space:
mode:
authorSpace Meyer <meyerpatrick@google.com>2022-07-30 12:04:54 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-09-01 10:42:40 +0200
commit8ed3d47016fdf9afc7672bd6fddcf4a7250b6d12 (patch)
treeb4c7e58e7868a8b1d297445e38f494a248cbda5b /pkg/vcs/linux.go
parent1628b0078d029469c90644c3e8ba5acf7c307c6a (diff)
pkg/vcs: cherry pick fix for compiling linux with clang prior to v5.11
Diffstat (limited to 'pkg/vcs/linux.go')
-rw-r--r--pkg/vcs/linux.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go
index d48db3256..a44729233 100644
--- a/pkg/vcs/linux.go
+++ b/pkg/vcs/linux.go
@@ -137,6 +137,22 @@ func (ctx *linux) EnvForCommit(binDir, commit string, kernelConfig []byte) (*Bis
KernelConfig: cf.Serialize(),
}
+ // Compiling v4.6..v5.11 with a modern objtool, w/o this patch, results in the
+ // following issue, when compiling with clang:
+ // arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table
+ // We don't bisect that far back with neither clang nor gcc, so this should be fine:
+ fix := "1d489151e9f9d1647110277ff77282fe4d96d09b"
+ contained, err := ctx.git.Contains(fix)
+ if err != nil {
+ return nil, err
+ }
+ if !contained {
+ _, err := ctx.git.git("cherry-pick", "--no-commit", fix)
+ if err != nil {
+ return nil, err
+ }
+ }
+
return env, nil
}