aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/build/linux.go5
-rw-r--r--pkg/vcs/linux.go2
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/build/linux.go b/pkg/build/linux.go
index a74f056c0..6f49466b6 100644
--- a/pkg/build/linux.go
+++ b/pkg/build/linux.go
@@ -133,12 +133,15 @@ func runMake(kernelDir string, args ...string) error {
cmd.Env = append([]string{}, os.Environ()...)
// This makes the build [more] deterministic:
// 2 builds from the same sources should result in the same vmlinux binary.
- // We plan to use it for detecting no-op changes during bisection.
+ // Build on a release commit and on the previous one should result in the same vmlinux too.
+ // We use it for detecting no-op changes during bisection.
cmd.Env = append(cmd.Env,
"KBUILD_BUILD_VERSION=0",
"KBUILD_BUILD_TIMESTAMP=now",
"KBUILD_BUILD_USER=syzkaller",
"KBUILD_BUILD_HOST=syzkaller",
+ "KERNELVERSION=syzkaller",
+ "LOCALVERSION=-syzkaller",
)
_, err := osutil.Run(time.Hour, cmd)
return err
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go
index b14b75280..c07c6aeaa 100644
--- a/pkg/vcs/linux.go
+++ b/pkg/vcs/linux.go
@@ -154,6 +154,8 @@ func linuxDisableConfigs(config []byte, tags map[string]bool) []byte {
// Second, at 6689da155bdcd17abfe4d3a8b1e245d9ed4b5f2c CONFIG_KCOV selects CONFIG_GCC_PLUGIN_SANCOV
// (why?), which is build broken for hundreds of revisions.
"CONFIG_KCOV": "disable-always",
+ // This helps to produce stable binaries in presence of kernel tag changes.
+ "CONFIG_LOCALVERSION_AUTO": "disable-always",
}
for cfg, tag := range prereq {
if !tags[tag] {