diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-05-30 16:09:29 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-05-30 16:09:29 +0800 |
commit | 9ada5ea3626964561ed983c64cf04bcdf44e6806 (patch) | |
tree | ef11761a245eacdb77c3e63a35d62bfdffcc6f0d /distrib/kernel-toolchain/toolbox.sh | |
parent | 77a5ed00afb5ef40081a59dabf3c90734d12f439 (diff) | |
download | external_qemu-9ada5ea3626964561ed983c64cf04bcdf44e6806.zip external_qemu-9ada5ea3626964561ed983c64cf04bcdf44e6806.tar.gz external_qemu-9ada5ea3626964561ed983c64cf04bcdf44e6806.tar.bz2 |
Fixed prebuilt path and toolchain names
1) Use "prebuilts" instead of "prebuilt" to legalize BUILD_TOP
2) Update CROSSTOOLCHAIN and CROSSPREFIX for all arch
3) Add -fno-pic because some toolchain (eg. x86 and mips)
in prebuilts/gcc are NDK-compatible (ie. enforces -fpic, etc)
Verified to build working kernel-goldfish for all arch
Change-Id: I93ac8f0beeaae14aa4575629fd8eaf4af73ef7ce
Diffstat (limited to 'distrib/kernel-toolchain/toolbox.sh')
-rwxr-xr-x | distrib/kernel-toolchain/toolbox.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/distrib/kernel-toolchain/toolbox.sh b/distrib/kernel-toolchain/toolbox.sh index b9947e2..89b49bb 100755 --- a/distrib/kernel-toolchain/toolbox.sh +++ b/distrib/kernel-toolchain/toolbox.sh @@ -1,10 +1,10 @@ #!/bin/sh # -# This is a wrapper around our x86 toolchain that allows us to add a few +# This is a wrapper around our toolchain that allows us to add a few # compiler flags. -# The issue is that our x86 toolchain is NDK-compatible, and hence enforces -# -mfpmath=sse and -fpic by default. When building the kernel, we need to -# disable this. +# The issue is that our toolchain are NDK-compatible, and hence enforces +# -fpic (and also -mfpmath=sse for x86) by default. When building the +# kernel, we need to disable this. # # Also support ccache compilation if USE_CCACHE is defined as "1" # @@ -43,9 +43,13 @@ PROGSUFFIX=${PROGNAME##$PROGPREFIX} EXTRA_FLAGS= -# Special case #1: For x86, disable SSE FPU arithmetic, and PIC code -if [ "$ARCH" = "x86" -a "$PROGSUFFIX" = gcc ]; then - EXTRA_FLAGS=$EXTRA_FLAGS" -mfpmath=387 -fno-pic" +if [ "$PROGSUFFIX" = gcc ]; then + # Special case #1: For all, disable PIC code + EXTRA_FLAGS=$EXTRA_FLAGS" -fno-pic" + if [ "$ARCH" = "x86" ]; then + # Special case #2: For x86, disable SSE FPU arithmetic too + EXTRA_FLAGS=$EXTRA_FLAGS" -mfpmath=387" + fi fi # Invoke real cross-compiler toolchain program now |