diff options
author | David 'Digit' Turner <digit@google.com> | 2011-12-14 21:18:50 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-12-16 14:49:14 +0100 |
commit | bc9cbbe2a02d84d57854c211449f6491a6140eab (patch) | |
tree | f0aec5ab1f2e93825ee30fcbf7fa55b4ffd5ef0b /distrib/build-kernel.sh | |
parent | d86c724b74e6c04a89219d87559d0b580e100445 (diff) | |
download | external_qemu-bc9cbbe2a02d84d57854c211449f6491a6140eab.zip external_qemu-bc9cbbe2a02d84d57854c211449f6491a6140eab.tar.gz external_qemu-bc9cbbe2a02d84d57854c211449f6491a6140eab.tar.bz2 |
kernel: update build-kernel.sh script for x86
This updates the build-kernel.sh script to be able to rebuild
the x86 goldfish kernel from sources using our NDK-compatible
toolchain. This is needed because the toolchain is configured
with -mfpmath=sse and -fpic by default, which we need to disable.
Because the kernel build system doesn't allow us to provide extra
compiler flags easily, we create a "magic" wrapper toolchain to
do it for us (see toolbox.sh)
Change-Id: Ie868497dc5543d1149c51f354daa567863b638dc
Diffstat (limited to 'distrib/build-kernel.sh')
-rwxr-xr-x | distrib/build-kernel.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/distrib/build-kernel.sh b/distrib/build-kernel.sh index 0329156..20d85c6 100755 --- a/distrib/build-kernel.sh +++ b/distrib/build-kernel.sh @@ -182,6 +182,18 @@ else echo "Auto-config: -j$JOBS" fi + +# Special magic redirection with our magic toolbox script +# This is needed to add extra compiler flags for x86 +# +# We could use that for ARM, but don't need to at the moment. +# +if [ "$ARCH" = "x86" ]; then + export REAL_CROSS_COMPILE="$CROSS_COMPILE" + export ARCH + CROSS_COMPILE=$(dirname "$0")/kernel-toolchain/android-kernel-toolchain- +fi + # Do the build # rm -f include/asm && |