From b0e6aca75ead7ae3481247c4093f8f579fd23f55 Mon Sep 17 00:00:00 2001 From: Space Meyer Date: Fri, 5 May 2023 14:51:17 +0200 Subject: pkg/vcs: use gcc 10.1 for linux v5.8..v5.16 This was already the case before #3420. Using the default compiler so far back was overly optimistic, as pointed out in #3814. --- pkg/vcs/linux.go | 6 ++++-- pkg/vcs/linux_test.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index 2ec37b3b1..29ea05280 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -203,9 +203,11 @@ func linuxClangPath(tags map[string]bool, binDir, defaultCompiler string) string func linuxGCCPath(tags map[string]bool, binDir, defaultCompiler string) string { version := "" switch { - case tags["v5.9"]: - // Verified to work with 10.1.0. + case tags["v5.16"]: + // Verified to work with 15.0.7. return defaultCompiler + case tags["v5.9"]: + version = "10.1.0" case tags["v4.12"]: version = "8.1.0" case tags["v4.11"]: diff --git a/pkg/vcs/linux_test.go b/pkg/vcs/linux_test.go index 1865aa2d6..5e81760a2 100644 --- a/pkg/vcs/linux_test.go +++ b/pkg/vcs/linux_test.go @@ -43,7 +43,7 @@ func TestGCCVersion(t *testing.T) { assert.Equal(t, actual, expected, "unexpected gcc path") // Recent tag case. - tags["v5.9"] = true + tags["v5.16"] = true actual = linuxGCCPath(tags, binDir, defaultCompiler) expected = defaultCompiler assert.Equal(t, actual, expected, "unexpected gcc path") -- cgit mrf-deployment