lineage: config: Don't pass CFLAGS_MODULE="-fno-pic" if using LLVM

* Seemingly not an issue for kernels compiled with
   LLVM, tested with kernel versions 4.4 -> 5.4.

Change-Id: I00adee2e10e99a540099b5e1a6a1ab9be0b99050
This commit is contained in:
Alexander Koskovich 2022-06-15 23:58:31 -07:00 committed by Michael Bestas
parent 911b7c47b3
commit d807db71bc
No known key found for this signature in database
GPG key ID: CC95044519BE6669

View file

@ -111,14 +111,16 @@ KERNEL_MAKE_FLAGS :=
# Add back threads, ninja cuts this to $(nproc)/2
KERNEL_MAKE_FLAGS += -j$(shell prebuilts/tools-lineage/$(HOST_PREBUILT_TAG)/bin/nproc --all)
ifeq ($(KERNEL_ARCH),arm)
# Avoid "Unknown symbol _GLOBAL_OFFSET_TABLE_" errors
KERNEL_MAKE_FLAGS += CFLAGS_MODULE="-fno-pic"
endif
ifeq ($(TARGET_KERNEL_CLANG_COMPILE),false)
ifeq ($(KERNEL_ARCH),arm)
# Avoid "Unknown symbol _GLOBAL_OFFSET_TABLE_" errors
KERNEL_MAKE_FLAGS += CFLAGS_MODULE="-fno-pic"
endif
ifeq ($(KERNEL_ARCH),arm64)
# Avoid "unsupported RELA relocation: 311" errors (R_AARCH64_ADR_GOT_PAGE)
KERNEL_MAKE_FLAGS += CFLAGS_MODULE="-fno-pic"
ifeq ($(KERNEL_ARCH),arm64)
# Avoid "unsupported RELA relocation: 311" errors (R_AARCH64_ADR_GOT_PAGE)
KERNEL_MAKE_FLAGS += CFLAGS_MODULE="-fno-pic"
endif
endif
ifeq ($(HOST_OS),darwin)