Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
This reverts commit 4c451dba25
.
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
This commit is contained in:
parent
bc09bee25e
commit
be047631de
6 changed files with 6 additions and 17 deletions
6
Makefile
6
Makefile
|
@ -501,11 +501,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(cc-name),clang)
|
ifeq ($(cc-name),clang)
|
||||||
ifneq ($(CROSS_COMPILE),)
|
ifneq ($(CROSS_COMPILE),)
|
||||||
CLANG_TRIPLE ?= $(CROSS_COMPILE)
|
CLANG_FLAGS += --target=$(notdir $(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
|
|
||||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
||||||
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
||||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
ARCH=arm64
|
ARCH=arm64
|
||||||
|
|
||||||
CLANG_TRIPLE=aarch64-linux-gnu-
|
CROSS_COMPILE=aarch64-linux-gnu-
|
||||||
CROSS_COMPILE=aarch64-linux-androidkernel-
|
CROSS_COMPILE_COMPAT=arm-linux-gnueabi-
|
||||||
CROSS_COMPILE_COMPAT=arm-linux-androidkernel-
|
|
||||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
||||||
LINUX_GCC_CROSS_COMPILE_COMPAT_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
LINUX_GCC_CROSS_COMPILE_COMPAT_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,5 @@ function update_config() {
|
||||||
-e UNWINDER_FRAME_POINTER \
|
-e UNWINDER_FRAME_POINTER \
|
||||||
|
|
||||||
(cd ${OUT_DIR} && \
|
(cd ${OUT_DIR} && \
|
||||||
make O=${OUT_DIR} $archsubarch CLANG_TRIPLE=${CLANG_TRIPLE} CROSS_COMPILE=${CROSS_COMPILE} "${TOOL_ARGS[@]}" ${MAKE_ARGS} olddefconfig)
|
make O=${OUT_DIR} $archsubarch CROSS_COMPILE=${CROSS_COMPILE} "${TOOL_ARGS[@]}" ${MAKE_ARGS} olddefconfig)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
ARCH=arm
|
ARCH=arm
|
||||||
|
|
||||||
CLANG_TRIPLE=arm-linux-gnueabi-
|
CROSS_COMPILE=arm-linux-gnueabi-
|
||||||
CROSS_COMPILE=arm-linux-androidkernel-
|
|
||||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
||||||
|
|
||||||
FILES="
|
FILES="
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
ARCH=x86_64
|
ARCH=x86_64
|
||||||
|
|
||||||
CLANG_TRIPLE=x86_64-linux-gnu-
|
CROSS_COMPILE=x86_64-linux-gnu-
|
||||||
CROSS_COMPILE=x86_64-linux-androidkernel-
|
|
||||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
||||||
|
|
||||||
FILES="
|
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…
Reference in a new issue