1 // UNSUPPORTED: system-windows
3 // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \
4 // RUN: --stdlib=platform 2>&1 | FileCheck --check-prefix=CHECK %s
6 // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
7 // CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10"
8 /// Debian specific - the path component after 'include' is i386-gnu even
9 /// though the installation is i686-gnu.
10 // CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/i386-gnu/c++/10"
11 // CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10/backward"
12 // CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include"
13 // CHECK: "-internal-externc-isystem"
14 // CHECK-SAME: {{^}} "[[SYSROOT]]/usr/include/i386-gnu"
15 // CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/include"
16 // CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
17 // CHECK: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]"
18 // CHECK: "-dynamic-linker" "/lib/ld.so"
19 // CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbegin.o"
21 // CHECK-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10"
22 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32"
23 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu"
24 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32"
25 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu"
26 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/../lib32"
27 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib"
28 // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib"
30 // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \
31 // RUN: --stdlib=platform -static 2>&1 | FileCheck --check-prefix=CHECK-STATIC %s
32 // CHECK-STATIC: "-cc1"
33 // CHECK-STATIC: "-static-define"
34 // CHECK-STATIC: "-isysroot" "[[SYSROOT:[^"]+]]"
35 // CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10"
36 /// Debian specific - the path component after 'include' is i386-gnu even
37 /// though the installation is i686-gnu.
38 // CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/i386-gnu/c++/10"
39 // CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10/backward"
40 // CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include"
41 // CHECK-STATIC: "-internal-externc-isystem"
42 // CHECK-STATIC-SAME: {{^}} "[[SYSROOT]]/usr/include/i386-gnu"
43 // CHECK-STATIC-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/include"
44 // CHECK-STATIC-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
45 // CHECK-STATIC: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]"
46 // CHECK-STATIC: "-static"
47 // CHECK-STATIC: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbeginT.o"
49 // CHECK-STATIC-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10"
50 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32"
51 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu"
52 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32"
53 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu"
54 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/../lib32"
55 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib"
56 // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib"
58 // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \
59 // RUN: -shared 2>&1 | FileCheck --check-prefix=CHECK-SHARED %s
60 // CHECK-SHARED: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]"
61 // CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbeginS.o"
63 // CHECK-SHARED-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10"
64 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32"
65 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu"
66 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32"
67 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu"
68 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/../lib32"
69 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/lib"
70 // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib"
72 // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \
73 // RUN: --gcc-toolchain=%S/Inputs/basic_cross_hurd_tree/usr \
74 // RUN: --target=i686-pc-gnu \
75 // RUN: | FileCheck --check-prefix=CHECK-CROSS %s
76 // CHECK-CROSS: "-cc1" "-triple" "i686-pc-hurd-gnu"
77 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/as" "--32"
78 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386"
79 // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o"
80 // CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/lib"