OSDN Git Service

ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple
authorGreg Hackmann <ghackmann@google.com>
Tue, 25 Oct 2016 20:59:59 +0000 (13:59 -0700)
committerGreg Hackmann <ghackmann@google.com>
Mon, 9 Oct 2017 21:00:14 +0000 (14:00 -0700)
commitf0907aa15ed9f9c7541bb244ed3f52c376ced19c
tree8dc36249acda05778150658918a6637109e7db7b
parente9186826bb135f8cef70cb21689291cd8e6961af
ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple

Android has an unusual setup where the kernel needs to target
[arch]-linux-gnu to avoid Android userspace-specific flags and
optimizations, but AOSP doesn't ship a matching binutils.

Add a new variable CLANG_TRIPLE which can override the "-target" triple
used to compile the kernel, while using a different CROSS_COMPILE to
pick the binutils/gcc installation.  For Android you'd do something
like:

  export CLANG_TRIPLE=aarch64-linux-gnu-
  export CROSS_COMPILE=aarch64-linux-android-

If you don't need something like this, leave CLANG_TRIPLE unset and it
will default to CROSS_COMPILE.

Change-Id: Ib544c37f4ee4ed005437471b2984486a3e7c0da7
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Makefile