1 // Check frontend and linker invocations on the IMG MIPS toolchain. 2 // 3 // = Big-endian, mips32r6 4 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 5 // RUN: --target=mips-img-linux-gnu -mips32r6 \ 6 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 7 // RUN: | FileCheck --check-prefix=CHECK-BE-32R6 %s 8 // CHECK-BE-32R6: "-internal-isystem" 9 // CHECK-BE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 10 // CHECK-BE-32R6: "-internal-isystem" 11 // CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu" 12 // CHECK-BE-32R6: "-internal-isystem" 13 // CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 14 // CHECK-BE-32R6: "-internal-externc-isystem" 15 // CHECK-BE-32R6: "[[TC]]/include" 16 // CHECK-BE-32R6: "-internal-externc-isystem" 17 // CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/include" 18 // CHECK-BE-32R6: "{{.*}}ld{{(.exe)?}}" 19 // CHECK-BE-32R6: "--sysroot=[[TC]]/../../../../sysroot" 20 // CHECK-BE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1" 21 // CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crt1.o" 22 // CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crti.o" 23 // CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtbegin.o" 24 // CHECK-BE-32R6: "-L[[TC]]" 25 // CHECK-BE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib" 26 // CHECK-BE-32R6: "-L[[TC]]/../../../../sysroot/usr/lib/../lib" 27 // CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtend.o" 28 // CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crtn.o" 29 // 30 // = Little-endian, mips32r6 31 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 32 // RUN: --target=mips-img-linux-gnu -mips32r6 -EL \ 33 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 34 // RUN: | FileCheck --check-prefix=CHECK-LE-32R6 %s 35 // CHECK-LE-32R6: "-internal-isystem" 36 // CHECK-LE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 37 // CHECK-LE-32R6: "-internal-isystem" 38 // CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/el" 39 // CHECK-LE-32R6: "-internal-isystem" 40 // CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 41 // CHECK-LE-32R6: "-internal-externc-isystem" 42 // CHECK-LE-32R6: "[[TC]]/include" 43 // CHECK-LE-32R6: "-internal-externc-isystem" 44 // CHECK-LE-32R6: "[[TC]]/../../../../sysroot/usr/include" 45 // CHECK-LE-32R6: "{{.*}}ld{{(.exe)?}}" 46 // CHECK-LE-32R6: "--sysroot=[[TC]]/../../../../sysroot/el" 47 // CHECK-LE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1" 48 // CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crt1.o" 49 // CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crti.o" 50 // CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtbegin.o" 51 // CHECK-LE-32R6: "-L[[TC]]/el" 52 // CHECK-LE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib/el" 53 // CHECK-LE-32R6: "-L[[TC]]/../../../../sysroot/el/usr/lib/../lib" 54 // CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtend.o" 55 // CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crtn.o" 56 // 57 // = Big-endian, mips64r6, N32 58 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 59 // RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=n32 \ 60 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 61 // RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N32 %s 62 // CHECK-BE-64R6-N32: "-internal-isystem" 63 // CHECK-BE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 64 // CHECK-BE-64R6-N32: "-internal-isystem" 65 // CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6" 66 // CHECK-BE-64R6-N32: "-internal-isystem" 67 // CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 68 // CHECK-BE-64R6-N32: "-internal-externc-isystem" 69 // CHECK-BE-64R6-N32: "[[TC]]/include" 70 // CHECK-BE-64R6-N32: "-internal-externc-isystem" 71 // CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include" 72 // CHECK-BE-64R6-N32: "{{.*}}ld{{(.exe)?}}" 73 // CHECK-BE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6" 74 // CHECK-BE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1" 75 // CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crt1.o" 76 // CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crti.o" 77 // CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtbegin.o" 78 // CHECK-BE-64R6-N32: "-L[[TC]]/mips64r6" 79 // CHECK-BE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6" 80 // CHECK-BE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/usr/lib" 81 // CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtend.o" 82 // CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crtn.o" 83 // 84 // = Little-endian, mips64r6, N32 85 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 86 // RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=n32 \ 87 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 88 // RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N32 %s 89 // CHECK-LE-64R6-N32: "-internal-isystem" 90 // CHECK-LE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 91 // CHECK-LE-64R6-N32: "-internal-isystem" 92 // CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/el" 93 // CHECK-LE-64R6-N32: "-internal-isystem" 94 // CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 95 // CHECK-LE-64R6-N32: "-internal-externc-isystem" 96 // CHECK-LE-64R6-N32: "[[TC]]/include" 97 // CHECK-LE-64R6-N32: "-internal-externc-isystem" 98 // CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include" 99 // CHECK-LE-64R6-N32: "{{.*}}ld{{(.exe)?}}" 100 // CHECK-LE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/el" 101 // CHECK-LE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1" 102 // CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crt1.o" 103 // CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crti.o" 104 // CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtbegin.o" 105 // CHECK-LE-64R6-N32: "-L[[TC]]/mips64r6/el" 106 // CHECK-LE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/el" 107 // CHECK-LE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/el/usr/lib" 108 // CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtend.o" 109 // CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crtn.o" 110 // 111 // = Big-endian, mips64r6, N64 112 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 113 // RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=64 \ 114 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 115 // RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N64 %s 116 // CHECK-BE-64R6-N64: "-internal-isystem" 117 // CHECK-BE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 118 // CHECK-BE-64R6-N64: "-internal-isystem" 119 // CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64" 120 // CHECK-BE-64R6-N64: "-internal-isystem" 121 // CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 122 // CHECK-BE-64R6-N64: "-internal-externc-isystem" 123 // CHECK-BE-64R6-N64: "[[TC]]/include" 124 // CHECK-BE-64R6-N64: "-internal-externc-isystem" 125 // CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include" 126 // CHECK-BE-64R6-N64: "{{.*}}ld{{(.exe)?}}" 127 // CHECK-BE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64" 128 // CHECK-BE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1" 129 // CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crt1.o" 130 // CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crti.o" 131 // CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtbegin.o" 132 // CHECK-BE-64R6-N64: "-L[[TC]]/mips64r6/64" 133 // CHECK-BE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64" 134 // CHECK-BE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/usr/lib" 135 // CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtend.o" 136 // CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crtn.o" 137 // 138 // = Little-endian, mips64r6, N64 139 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 140 // RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=64 \ 141 // RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/mips_img_tree \ 142 // RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N64 %s 143 // CHECK-LE-64R6-N64: "-internal-isystem" 144 // CHECK-LE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0" 145 // CHECK-LE-64R6-N64: "-internal-isystem" 146 // CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64/el" 147 // CHECK-LE-64R6-N64: "-internal-isystem" 148 // CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward" 149 // CHECK-LE-64R6-N64: "-internal-externc-isystem" 150 // CHECK-LE-64R6-N64: "[[TC]]/include" 151 // CHECK-LE-64R6-N64: "-internal-externc-isystem" 152 // CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include" 153 // CHECK-LE-64R6-N64: "{{.*}}ld{{(.exe)?}}" 154 // CHECK-LE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64/el" 155 // CHECK-LE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1" 156 // CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crt1.o" 157 // CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crti.o" 158 // CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtbegin.o" 159 // CHECK-LE-64R6-N64: "-L[[TC]]/mips64r6/64/el" 160 // CHECK-LE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64/el" 161 // CHECK-LE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib" 162 // CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtend.o" 163 // CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crtn.o" 164