Skip to content

Commit

Permalink
kernel: Don't try to do math on empty kernel version
Browse files Browse the repository at this point in the history
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
  • Loading branch information
luk1337 authored and basamaryan committed Aug 14, 2023
1 parent 6b0537a commit a7324a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions config/BoardConfigKernel.mk
Expand Up @@ -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

Expand Down

0 comments on commit a7324a9

Please sign in to comment.