Fix FindToolchain for mips.

Change-Id: Ib2689e24065e9d5a0c249a26c63e6493327fc0b1
This commit is contained in:
Elliott Hughes
2014-07-01 12:22:06 -07:00
parent c9e0acf2ac
commit 1ba94df0c9

View File

@@ -62,17 +62,19 @@ def FindToolchain():
if TOOLCHAIN is not None:
return TOOLCHAIN
# We say "arm64", GCC says "aarch64".
# We use slightly different names from GCC.
gcc_arch = ARCH
if gcc_arch == "arm64":
gcc_arch = "aarch64"
elif gcc_arch == "mips":
gcc_arch = "mipsel"
tc1 = os.environ["ANDROID_TOOLCHAIN"]
tc2 = os.environ["ANDROID_TOOLCHAIN_2ND_ARCH"]
if (gcc_arch + "/" + gcc_arch + "-") in tc1:
if ("/" + gcc_arch + "-linux-") in tc1:
toolchain = tc1
elif (gcc_arch + "/" + gcc_arch + "-") in tc2:
elif ("/" + gcc_arch + "-linux-") in tc2:
toolchain = tc2
else:
raise Exception("Could not find tool chain for %s" % (gcc_arch))