mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
This reverts commit e145f7b10374662f03889c2dea0fdc14df7f1371. AOSP's distribution of GNU binutils always had a curious target triple prefix on the binaries. Now that GNU binutils is deprecated for Android Common Kernels, we can now remove this out of tree workaround. Now building Android kernels with LLVM matches upstream (see Documentation/kbuild/llvm.rst). Bug: 118439987 Bug: 120440614 Bug: 141693040 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Change-Id: Iecaa3264a440f795f2f3a44bdf74fe28ad4ed1cc Signed-off-by: Sukrut4778 <sukrut4778@gmail.com> Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
parent
980495f459
commit
86e47c6486
6
Makefile
6
Makefile
@ -521,11 +521,7 @@ endif
|
||||
|
||||
ifeq ($(cc-name),clang)
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
CLANG_TRIPLE ?= $(CROSS_COMPILE)
|
||||
CLANG_FLAGS += --target=$(notdir $(CLANG_TRIPLE:%-=%))
|
||||
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y)
|
||||
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
||||
endif
|
||||
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
|
||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
||||
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||
|
@ -1,7 +1,7 @@
|
||||
ARCH=arm64
|
||||
|
||||
CLANG_TRIPLE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE=aarch64-linux-androidkernel-
|
||||
CROSS_COMPILE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE_COMPAT=arm-linux-gnueabi-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
|
||||
|
||||
FILES="
|
||||
|
@ -1,7 +1,6 @@
|
||||
ARCH=x86_64
|
||||
|
||||
CLANG_TRIPLE=x86_64-linux-gnu-
|
||||
CROSS_COMPILE=x86_64-linux-androidkernel-
|
||||
CROSS_COMPILE=x86_64-linux-gnu-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
|
||||
|
||||
FILES="
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
$* -dM -E - </dev/null 2>&1 | grep -q __ANDROID__ && echo "y"
|
Loading…
x
Reference in New Issue
Block a user