From 283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Wed, 5 Mar 2014 17:21:18 +0800 Subject: Fix host 64-bit gcc4.6 build ANDROID_CC1_SPEC should be used with argument, otherwise it's not expanded and fail compilation. Note that we are not building 64-bit 4.6 target toolchain. 64-bit target toolchains are built from 4.7 and up instead. This issue only occurs when building 64-bit host compiler (x86_64), eg. aosp/prebuilts/gcc/linux-x86/host. The argument doesn't matter, although we put "-fPIC" to be consistent with its 32-bit counterpart Change-Id: I746b14a6e4471a4bd62fb4e29b574669d4b7a9d1 --- gcc-4.6/gcc/config/i386/linux64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc-4.6/gcc/config/i386/linux64.h b/gcc-4.6/gcc/config/i386/linux64.h index c72177818..622daaf70 100644 --- a/gcc-4.6/gcc/config/i386/linux64.h +++ b/gcc-4.6/gcc/config/i386/linux64.h @@ -46,7 +46,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef CC1_SPEC #define CC1_SPEC \ LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \ - LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) + LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fPIC")) /* The svr4 ABI for the i386 says that records and unions are returned in memory. In the 64bit compilation we will turn this flag off in -- cgit v1.2.3