Add i686-linux-android for gcc toolchain detection.

* Look for i686-linux-android under <sysroot>/lib/gcc.

* This patch also slightly enhance the test suite for
  Android GCC toolchain detection.

llvm-svn: 169557
This commit is contained in:
Logan Chien 2012-12-06 22:59:37 +00:00
parent b9d5df58d4
commit 74aa8f1141
9 changed files with 26 additions and 4 deletions

View File

@ -1094,6 +1094,7 @@ Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(
"i686-pc-linux-gnu",
"i486-linux-gnu",
"i386-linux-gnu",
"i686-linux-android",
"i686-redhat-linux",
"i586-redhat-linux",
"i386-redhat-linux",

View File

@ -0,0 +1,21 @@
// Test Android Toolchain Detection
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o \
// RUN: -target arm-linux-androideabi \
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-ARM %s
// CHECK-ANDROID-ARM: "{{.*}}/Inputs/basic_android_tree/{{.*}}/arm-linux-androideabi/bin/as"
// CHECK-ANDROID-ARM: "{{.*}}/Inputs/basic_android_tree/{{.*}}/arm-linux-androideabi/bin/ld"
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o \
// RUN: -target mipsel-linux-android \
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-MIPS %s
// CHECK-ANDROID-MIPS: "{{.*}}/Inputs/basic_android_tree/{{.*}}/mipsel-linux-android/bin/as"
// CHECK-ANDROID-MIPS: "{{.*}}/Inputs/basic_android_tree/{{.*}}/mipsel-linux-android/bin/ld"
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o \
// RUN: -target i686-linux-android \
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-X86 %s
// CHECK-ANDROID-X86: "{{.*}}/Inputs/basic_android_tree/{{.*}}/i686-linux-android/bin/ld"

View File

@ -412,7 +412,7 @@
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target i386-linux-android \
// RUN: -target i686-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@ -439,7 +439,7 @@
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target i386-linux-android \
// RUN: -target i686-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
@ -468,7 +468,7 @@
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target i386-linux-android \
// RUN: -target i686-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
@ -496,7 +496,7 @@
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target i386-linux-android \
// RUN: -target i686-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s