kernel: Don't try to do math on empty kernel version

Fixes the following error message when compiling target w/o kernel src:
expr: syntax error: unexpected argument ‘5’

Test: lunch lineage_sdk_phone_x86_64-eng
Change-Id: Ib3ec41d9dc2b59ddc9ee3c0c8e3813c4defcfc3e
This commit is contained in:
LuK1337
2023-08-01 19:59:14 +02:00
committed by Łukasz Patron
parent 9d0a2f2271
commit eb934e66c4

View File

@@ -74,9 +74,11 @@ KERNEL_PATCHLEVEL := $(shell grep -s "^PATCHLEVEL = " $(TARGET_KERNEL_SOURCE)/Ma
TARGET_KERNEL_VERSION ?= $(shell echo $(KERNEL_VERSION)"."$(KERNEL_PATCHLEVEL))
# 5.10+ can fully compile without GCC by default
ifeq ($(shell expr $(KERNEL_VERSION) \>= 5), 1)
ifeq ($(shell expr $(KERNEL_PATCHLEVEL) \>= 10), 1)
TARGET_KERNEL_NO_GCC ?= true
ifneq ($(KERNEL_VERSION),)
ifeq ($(shell expr $(KERNEL_VERSION) \>= 5), 1)
ifeq ($(shell expr $(KERNEL_PATCHLEVEL) \>= 10), 1)
TARGET_KERNEL_NO_GCC ?= true
endif
endif
endif