]> granicus.if.org Git - clang/commitdiff
[Mips] Add support for nan2008 libraries and headers look up for Code
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 26 Nov 2013 11:57:48 +0000 (11:57 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 26 Nov 2013 11:57:48 +0000 (11:57 +0000)
Sourcery MIPS toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195753 91177308-0d34-0410-b5e6-96231b3b80d8

16 files changed:
lib/Driver/ToolChains.cpp
test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o [new file with mode: 0644]
test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o [new file with mode: 0644]
test/Driver/mips-cs.cpp

index b9e97fdc38389150e414b31c02c0ba76c95db2e9..0472cdca397bc2372ad42efbe864afebef5d6e42 100644 (file)
@@ -1457,6 +1457,8 @@ void Generic_GCC::GCCInstallationDetector::findMIPSABIDirSuffix(
 
   if (isSoftFloatABI(Args))
     Suffix += "/soft-float";
+  else if (isMipsNan2008(Args))
+    Suffix += "/nan2008";
 
   if (TargetArch == llvm::Triple::mipsel ||
       TargetArch == llvm::Triple::mips64el)
diff --git a/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o
new file mode 100644 (file)
index 0000000..e69de29
index 86675a3c83306a7713a4fecf42b1a4469d68ab2e..1e05939f5a27795c2f7c80dbd1d7c3d199d0eba9 100644 (file)
 // CHECK-BE-HF-MICRO: "[[TC]]/micromips{{/|\\\\}}crtend.o"
 // CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crtn.o"
 //
+// = Big-endian, hard float, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=mips-linux-gnu -mnan=2008 \
+// RUN:     --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-BE-HF-NAN %s
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/nan2008"
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-NAN: "-internal-externc-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/include"
+// CHECK-BE-HF-NAN: "-internal-externc-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-NAN: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-NAN: "--sysroot=[[SR:[^"]+]]/../../../../mips-linux-gnu/libc/nan2008"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF-NAN: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-NAN: "-L[[SR]]/nan2008"
+// CHECK-BE-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/lib/../lib/nan2008"
+// CHECK-BE-HF-NAN-NOT: "-L[[SR]]"
+// CHECK-BE-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/libc/nan2008/lib/../lib"
+// CHECK-BE-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib"
+// CHECK-BE-HF-NAN: "[[TC]]/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
 // = Big-endian, soft float
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
 // RUN:     --target=mips-linux-gnu -msoft-float \
 // CHECK-EL-HF-MICRO: "[[TC]]/micromips/el{{/|\\\\}}crtend.o"
 // CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crtn.o"
 //
+// = Little-endian, hard float, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=mipsel-linux-gnu -mnan=2008 \
+// RUN:     --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-EL-HF-NAN %s
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/nan2008/el"
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-NAN: "-internal-externc-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/include"
+// CHECK-EL-HF-NAN: "-internal-externc-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-NAN: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-NAN: "--sysroot=[[SR:[^"]+]]/../../../../mips-linux-gnu/libc/nan2008/el"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF-NAN: "[[TC]]/nan2008/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-NAN: "-L[[SR]]/nan2008/el"
+// CHECK-EL-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/lib/../lib/nan2008/el"
+// CHECK-EL-HF-NAN-NOT: "-L[[SR]]"
+// CHECK-EL-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/libc/nan2008/el/lib/../lib"
+// CHECK-EL-HF-NAN: "-L[[SR]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib"
+// CHECK-EL-HF-NAN: "[[TC]]/nan2008/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
 // = Little-endian, soft float
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
 // RUN:     --target=mipsel-linux-gnu -mfloat-abi=soft \