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
This commit is contained in:
Aaron Kling
2024-01-02 21:13:18 -06:00
committed by Bruno Martins
parent b38fb3a2d2
commit d2d4e46340

View File

@@ -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