1 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ 2 // RUN: --target=i386-pc-gnu \ 3 // RUN: --sysroot=%S/Inputs/basic_hurd_tree \ 4 // RUN: | FileCheck --check-prefix=CHECK %s 5 // CHECK-NOT: warning: 6 // CHECK: "-cc1" 7 // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]" 8 // CHECK: "-internal-isystem" "[[SYSROOT]]/usr/local/include" 9 // CHECK: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/i386-gnu" 10 // CHECK: "-internal-externc-isystem" "[[SYSROOT]]/include" 11 // CHECK: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" 12 // CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 13 // CHECK: "-dynamic-linker" "/lib/ld.so" 14 // CHECK: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" 15 // CHECK: "-L[[SYSROOT]]/lib/i386-gnu" 16 // CHECK: "-L[[SYSROOT]]/lib/../lib32" 17 // CHECK: "-L[[SYSROOT]]/usr/lib/i386-gnu" 18 // CHECK: "-L[[SYSROOT]]/usr/lib/../lib32" 19 // CHECK: "-L[[SYSROOT]]/lib" 20 // CHECK: "-L[[SYSROOT]]/usr/lib" 21 22 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ 23 // RUN: --target=i386-pc-gnu -static \ 24 // RUN: --sysroot=%S/Inputs/basic_hurd_tree \ 25 // RUN: | FileCheck --check-prefix=CHECK-STATIC %s 26 // CHECK-STATIC-NOT: warning: 27 // CHECK-STATIC: "-cc1" 28 // CHECK-STATIC: "-static-define" 29 // CHECK-STATIC: "-isysroot" "[[SYSROOT:[^"]+]]" 30 // CHECK-STATIC: "-internal-isystem" "[[SYSROOT]]/usr/local/include" 31 // CHECK-STATIC: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/i386-gnu" 32 // CHECK-STATIC: "-internal-externc-isystem" "[[SYSROOT]]/include" 33 // CHECK-STATIC: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" 34 // CHECK-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 35 // CHECK-STATIC: "-static" 36 // CHECK-STATIC: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginT.o" 37 // CHECK-STATIC: "-L[[SYSROOT]]/lib/i386-gnu" 38 // CHECK-STATIC: "-L[[SYSROOT]]/lib/../lib32" 39 // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib/i386-gnu" 40 // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib/../lib32" 41 // CHECK-STATIC: "-L[[SYSROOT]]/lib" 42 // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib" 43 44 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ 45 // RUN: --target=i386-pc-gnu -shared \ 46 // RUN: --sysroot=%S/Inputs/basic_hurd_tree \ 47 // RUN: | FileCheck --check-prefix=CHECK-SHARED %s 48 // CHECK-SHARED-NOT: warning: 49 // CHECK-SHARED: "-cc1" 50 // CHECK-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]" 51 // CHECK-SHARED: "-internal-isystem" "[[SYSROOT]]/usr/local/include" 52 // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/i386-gnu" 53 // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/include" 54 // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" 55 // CHECK-SHARED: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 56 // CHECK-SHARED: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginS.o" 57 // CHECK-SHARED: "-L[[SYSROOT]]/lib/i386-gnu" 58 // CHECK-SHARED: "-L[[SYSROOT]]/lib/../lib32" 59 // CHECK-SHARED: "-L[[SYSROOT]]/usr/lib/i386-gnu" 60 // CHECK-SHARED: "-L[[SYSROOT]]/usr/lib/../lib32" 61 // CHECK-SHARED: "-L[[SYSROOT]]/lib" 62 // CHECK-SHARED: "-L[[SYSROOT]]/usr/lib" 63 64 // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ 65 // RUN: --gcc-toolchain=%S/Inputs/basic_cross_hurd_tree/usr \ 66 // RUN: --target=i386-pc-gnu \ 67 // RUN: | FileCheck --check-prefix=CHECK-CROSS %s 68 // CHECK-CROSS-NOT: warning: 69 // CHECK-CROSS: "-cc1" "-triple" "i386-pc-hurd-gnu" 70 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}as" "--32" 71 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386" 72 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" 73 // CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/lib" 74