aboutsummaryrefslogtreecommitdiffstats
path: root/distrib/kernel-toolchain/toolbox.sh
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-11-18 15:47:18 -0800
committerSteve Kondik <shade@chemlab.org>2012-11-18 15:47:18 -0800
commita546c7006355a7bd1df4267ee53d0bfa2c017c8c (patch)
tree01be0bf6c0d6968e1468ec9661fd52110f9b05a7 /distrib/kernel-toolchain/toolbox.sh
parentbaf3d7830396202df5cc47bd7bcee109c319cdb3 (diff)
parent0f809250987b64f491bd3b4b73c0f0d33036a786 (diff)
downloadexternal_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.zip
external_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.tar.gz
external_qemu-a546c7006355a7bd1df4267ee53d0bfa2c017c8c.tar.bz2
Merge branch 'jb-mr1-release' of https://android.googlesource.com/platform/external/qemu into mr1-staging
Change-Id: I8a4a71ac65b08e6e17f26c942f67a15b85211115
Diffstat (limited to 'distrib/kernel-toolchain/toolbox.sh')
-rwxr-xr-xdistrib/kernel-toolchain/toolbox.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/distrib/kernel-toolchain/toolbox.sh b/distrib/kernel-toolchain/toolbox.sh
index 94e89b2..89b49bb 100755
--- a/distrib/kernel-toolchain/toolbox.sh
+++ b/distrib/kernel-toolchain/toolbox.sh
@@ -1,17 +1,17 @@
#!/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"
#
# REAL_CROSS_COMPILE must be defined, and its value must be one of the
# CROSS_COMPILE values that are supported by the Kernel build system
-# (e.g. "i686-android-linux-")
+# (e.g. "i686-linux-android-")
#
if [ -z "$REAL_CROSS_COMPILE" ]; then
echo "ERROR: The REAL_CROSS_COMPILE environment variable should be defined!"
@@ -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