Skip to content

Commit

Permalink
Merge pull request #241 from nathanchance/6.5.0-kgr-uprev
Browse files Browse the repository at this point in the history
Update default PGO kernel to 6.5.0 and update known good revision
  • Loading branch information
nathanchance authored Sep 5, 2023
2 parents 182ff73 + 6074dce commit 6e727dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build-llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from tc_build.tools import HostTools, StageTools

# This is a known good revision of LLVM for building the kernel
GOOD_REVISION = 'b5983a38cbf4eb405fe9583ab89e15db1dcfa173'
GOOD_REVISION = 'e280e406c2e34ce29e1e71da7cd3a284ea112ce8'

# The version of the Linux kernel that the script downloads if necessary
DEFAULT_KERNEL_FOR_PGO = (6, 4, 0)
DEFAULT_KERNEL_FOR_PGO = (6, 5, 0)

parser = ArgumentParser(formatter_class=RawTextHelpFormatter)
clone_options = parser.add_mutually_exclusive_group()
Expand Down
22 changes: 10 additions & 12 deletions tc_build/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class KernelBuilder(Builder):
# If the user supplies their own kernel source, it must be at least this
# version to ensure that all the build commands work, as the build commands
# were written to target at least this version.
MINIMUM_SUPPORTED_VERSION = (6, 1, 7)
MINIMUM_SUPPORTED_VERSION = (6, 5, 0)

def __init__(self, arch):
super().__init__()
Expand Down Expand Up @@ -196,11 +196,16 @@ def __init__(self):
self.config_targets = ['ppc64_guest_defconfig', 'disable-werror.config']
self.cross_compile = 'powerpc64-linux-gnu-'

# https://github.com/ClangBuiltLinux/linux/issues/602
self.make_variables['LD'] = self.cross_compile + 'ld'
# https://github.com/llvm/llvm-project/commit/33504b3bbe10d5d4caae13efcb99bd159c126070
def can_use_ias(self):
return self.toolchain_version >= (14, 0, 2)

# https://github.com/ClangBuiltLinux/linux/issues/1601
def needs_binutils(self):
return True


class PowerPC64LEKernelBuilder(PowerPCKernelBuilder):
class PowerPC64LEKernelBuilder(PowerPC64KernelBuilder):

def __init__(self):
super().__init__()
Expand All @@ -216,14 +221,6 @@ def build(self):

super().build()

# https://github.com/llvm/llvm-project/commit/33504b3bbe10d5d4caae13efcb99bd159c126070
def can_use_ias(self):
return self.toolchain_version >= (14, 0, 2)

# https://github.com/ClangBuiltLinux/linux/issues/1601
def needs_binutils(self):
return True


class RISCVKernelBuilder(KernelBuilder):

Expand Down Expand Up @@ -290,6 +287,7 @@ def build(self):
'AArch64': Arm64KernelBuilder,
'ARM': ArmKernelBuilder,
'Hexagon': HexagonKernelBuilder,
'PowerPC': PowerPC64KernelBuilder,
'RISCV': RISCVKernelBuilder,
'SystemZ': S390KernelBuilder,
'X86': X8664KernelBuilder,
Expand Down

0 comments on commit 6e727dd

Please sign in to comment.