Subject: Build LSK 3.14 kernel with android-toolchain

From: [email-masked] (Shawn Guo)
Date: Tue, 2 Dec 2014 20:34:59 +0800

On Tue, Dec 02, 2014 at 06:29:52PM +0800, Jisheng Zhang wrote:
> On Tue, 2 Dec 2014 02:24:03 -0800
> Arnd Bergmann <[email-masked]> wrote:
> > Yes, that's definitely possible. Any idea how the android folks build their
> > kernel?
> 
> copied from https://android.googlesource.com/toolchain/build/+/HEAD/README
> 
> The Android toolchain supports the following targets:
>    a. arm-linux-androideabi
>    b. arm-eabi  (for Android kernel)
>    c. arm-newlib-eabi	(for runnng gcc regression tests)
>    d. i[3456]86-*-linux-gnu, x86_64-*-linux-gnu	(for x86 targets)
> 
> So they build android kernel using the arm-eabi- toolchain.

Thanks Jisheng for all the information.

Yes, I just built my kernel with arm-eabi in android-toolchain-eabi-4.9-2014.09
and it works fine.  So we basically conclude that we should build kernel
with arm-eabi rather than arm-linux-androideabi.

One thing to note - with CONFIG_ARM_UNWIND turned on, even arm-eabi
generate the following warning.  This is one difference between android
arm-eabi and arm-linux-gnueabi we can see immediately.

  LD      vmlinux
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 31 of fs/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 12 of crypto/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 27 of block/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 27 of drivers/built-in.o is not in EXIDX output section
arm-eabi-ld: warning: unwinding may not work because EXIDX input section 33 of net/built-in.o is not in EXIDX output section

Shawn