From d2d4e463409127cd8ceb767a9e983dd11775bf6c Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Tue, 2 Jan 2024 21:13:18 -0600 Subject: [PATCH] kernel: Default to no gcc on kernel 6.x Current logic defaults to no gcc if kernel major version is greater than or equal to 5 and kernel minor version is greater than or equal to 10. Meaning kernel version 6.1 does not qualify because 1 is less than 10. So additionally check if kernel major version is greater than or equal to 6 and ignore minor version for that case. Change-Id: Id72cb9e100c6fed014d696f4a3a88f6cafcd3932 --- config/BoardConfigKernel.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk index 6579a4cc..a55715be 100644 --- a/config/BoardConfigKernel.mk +++ b/config/BoardConfigKernel.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2023 The LineageOS Project +# Copyright (C) 2018-2024 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -75,7 +75,9 @@ TARGET_KERNEL_VERSION ?= $(shell echo $(KERNEL_VERSION)"."$(KERNEL_PATCHLEVEL)) # 5.10+ can fully compile without GCC by default ifneq ($(KERNEL_VERSION),) - ifeq ($(shell expr $(KERNEL_VERSION) \>= 5), 1) + ifeq ($(shell expr $(KERNEL_VERSION) \>= 6), 1) + TARGET_KERNEL_NO_GCC ?= true + else ifeq ($(shell expr $(KERNEL_VERSION) \>= 5), 1) ifeq ($(shell expr $(KERNEL_PATCHLEVEL) \>= 10), 1) TARGET_KERNEL_NO_GCC ?= true endif