2011-10-03 14:41:08 +08:00
|
|
|
// General tests that ld invocations on Linux targets sane. Note that we use
|
|
|
|
// sysroot to make these tests independent of the host system.
|
2011-10-01 08:37:39 +08:00
|
|
|
//
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2011-10-01 08:37:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
|
2013-03-04 10:07:55 +08:00
|
|
|
// CHECK-LD-32-NOT: warning:
|
2011-10-03 14:41:08 +08:00
|
|
|
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
2011-10-03 16:09:02 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib"
|
2011-10-01 08:37:39 +08:00
|
|
|
//
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2011-10-01 08:37:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64 %s
|
2013-03-04 10:07:55 +08:00
|
|
|
// CHECK-LD-64-NOT: warning:
|
2011-10-03 14:41:08 +08:00
|
|
|
// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-64: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-64: "-dynamic-linker"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-LD-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
2011-10-03 16:09:02 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib"
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// CHECK-LD-64: "-lc"
|
|
|
|
// CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-07-10 23:27:19 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s
|
|
|
|
// CHECK-LD-X32-NOT: warning:
|
|
|
|
// CHECK-LD-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-X32: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-X32: "-m" "elf32_x86_64"
|
|
|
|
// CHECK-LD-X32: "-dynamic-linker"
|
|
|
|
// CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// CHECK-LD-X32: "-lc"
|
|
|
|
// CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-02-13 18:01:16 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: --rtlib=compiler-rt \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-RT %s
|
|
|
|
// CHECK-LD-RT-NOT: warning:
|
|
|
|
// CHECK-LD-RT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-RT: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-RT: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-RT: "-dynamic-linker"
|
|
|
|
// CHECK-LD-RT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-RT: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib"
|
2015-07-24 01:24:41 +08:00
|
|
|
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a"
|
2014-02-13 18:01:16 +08:00
|
|
|
// CHECK-LD-RT: "-lc"
|
2015-07-24 01:24:41 +08:00
|
|
|
// CHECK-LD-RT: libclang_rt.builtins-x86_64.a"
|
2015-01-29 07:23:36 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: --rtlib=compiler-rt \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-RT-ANDROID %s
|
|
|
|
// CHECK-LD-RT-ANDROID-NOT: warning:
|
|
|
|
// CHECK-LD-RT-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-RT-ANDROID: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-RT-ANDROID: "-m" "armelf_linux_eabi"
|
|
|
|
// CHECK-LD-RT-ANDROID: "-dynamic-linker"
|
2015-07-24 01:24:41 +08:00
|
|
|
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a"
|
2015-01-29 07:23:36 +08:00
|
|
|
// CHECK-LD-RT-ANDROID: "-lc"
|
2015-07-24 01:24:41 +08:00
|
|
|
// CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a"
|
2014-02-13 18:01:16 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-02-13 18:01:16 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: --rtlib=libgcc \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-GCC %s
|
|
|
|
// CHECK-LD-GCC-NOT: warning:
|
|
|
|
// CHECK-LD-GCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-GCC: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-GCC: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-GCC: "-dynamic-linker"
|
|
|
|
// CHECK-LD-GCC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-GCC: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib"
|
2015-09-01 05:48:52 +08:00
|
|
|
// CHECK-LD-GCC: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
2014-02-13 18:01:16 +08:00
|
|
|
// CHECK-LD-GCC: "-lc"
|
|
|
|
// CHECK-LD-GCC: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
|
2013-03-04 09:27:49 +08:00
|
|
|
// RUN: -static-libgcc \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-03-04 09:27:49 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC-LIBGCC %s
|
2013-03-04 10:07:55 +08:00
|
|
|
// CHECK-LD-64-STATIC-LIBGCC-NOT: warning:
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-dynamic-linker"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-lgcc" "-lgcc_eh"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-lc"
|
|
|
|
// CHECK-LD-64-STATIC-LIBGCC: "-lgcc" "-lgcc_eh"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
|
2013-03-04 09:27:49 +08:00
|
|
|
// RUN: -static \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-03-04 09:27:49 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s
|
2013-03-04 10:07:55 +08:00
|
|
|
// CHECK-LD-64-STATIC-NOT: warning:
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-64-STATIC-NOT: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-64-STATIC: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-64-STATIC-NOT: "-dynamic-linker"
|
|
|
|
// CHECK-LD-64-STATIC: "-static"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-LD-64-STATIC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbeginT.o"
|
2013-03-04 09:27:49 +08:00
|
|
|
// CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-64-STATIC: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-LD-64-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group"
|
2011-10-03 17:00:50 +08:00
|
|
|
//
|
2013-03-04 10:07:55 +08:00
|
|
|
// Check that flags can be combined. The -static dominates.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
|
2013-03-04 10:07:55 +08:00
|
|
|
// RUN: -static-libgcc -static \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-03-04 10:07:55 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s
|
|
|
|
//
|
2011-10-03 17:00:50 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 17:00:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-32-TO-32 %s
|
|
|
|
// CHECK-32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-32-TO-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2011-10-03 17:00:50 +08:00
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
2013-10-29 07:14:34 +08:00
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
2011-10-03 17:00:50 +08:00
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m64 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 17:00:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-32-TO-64 %s
|
|
|
|
// CHECK-32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-32-TO-64: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/64{{/|\\\\}}crtbegin.o"
|
2011-10-03 17:00:50 +08:00
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib"
|
2011-10-03 17:08:26 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -m64 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 17:08:26 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-64 %s
|
|
|
|
// CHECK-64-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-64-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2011-10-03 17:08:26 +08:00
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
2013-10-29 07:14:34 +08:00
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
2011-10-03 17:08:26 +08:00
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -m32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-03 17:08:26 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-32 %s
|
|
|
|
// CHECK-64-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-64-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o"
|
2011-10-03 17:08:26 +08:00
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib"
|
2011-10-05 09:01:57 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-07-10 23:27:19 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-07-10 23:27:19 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-X32 %s
|
|
|
|
// CHECK-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/lib/../libx32"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-X32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-07-11 22:28:45 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -mx32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-07-11 22:28:45 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-X32 %s
|
|
|
|
// CHECK-64-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-64-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/lib/../libx32"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i386-unknown-linux -mx32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-07-11 22:28:45 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-32-TO-X32 %s
|
|
|
|
// CHECK-32-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-32-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/lib/../libx32"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-08-18 23:38:38 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 -m64 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-08-18 23:38:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-X32-TO-64 %s
|
|
|
|
// CHECK-X32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-X32-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 -m32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-08-18 23:38:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-X32-TO-32 %s
|
|
|
|
// CHECK-X32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-X32-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -m32 \
|
|
|
|
// RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \
|
Fix using Clang as a cross compiler installed on a host machine and not
inside of a sysroot targeting a system+sysroot which is "similar" or
"compatible" with the host system. This shows up when trying to build
system images on largely compatible hardware as-if fully cross compiled.
The problem is that previously we *perfectly* mimiced GCC here, and it
turns out GCC has a bug that no one has really stumbled across. GCC will
try to look in thy system prefix ('/usr/local' f.ex.) into which it is
instaled to find libraries installed along side GCC that should be
preferred to the base system libraries ('/usr' f.ex.). This seems not
unreasonable, but it has a very unfortunate consequence when combined
with a '--sysroot' which does *not* contain the GCC installation we're
using to complete the toolchain. That results in some of the host
system's library directories being searched during the link.
Now, it so happens that most folks doing stuff like this use
'--with-sysroot' and '--disable-multilib' when configuring GCC. Even
better, they're usually not cross-compiling to a target that is similar
to the host. As a result, searching the host for libraries doesn't
really matter -- most of the time weird directories get appended that
don't exist (no arm triple lib directory, etc). Even if you're
cross-compiling from 32-bit to 64-bit x86 or vice-versa, disabling
multilib makes it less likely that you'll actually find viable libraries
on the host. But that's just luck. We shouldn't rely on this, and this
patch disables looking in the system prefix containing the GCC
installation if that system prefix is *outside* of the sysroot. For
empty sysroots, this has no effect. Similarly, when using the GCC
*inside* of the sysroot, we still track wherever it is installed within
the sysroot and look there for libraries. But now we can use a cross
compiler GCC installation outside the system root, and only look for the
crtbegin.o in the GCC installation, and look for all the other libraries
inside the system root.
This should fix PR12478, allowing Clang to be used when building
a ChromiumOS image without polluting the image with libraries from the
host system.
llvm-svn: 154176
2012-04-07 00:32:06 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-32-SYSROOT %s
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-64-TO-32-SYSROOT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o"
|
Fix using Clang as a cross compiler installed on a host machine and not
inside of a sysroot targeting a system+sysroot which is "similar" or
"compatible" with the host system. This shows up when trying to build
system images on largely compatible hardware as-if fully cross compiled.
The problem is that previously we *perfectly* mimiced GCC here, and it
turns out GCC has a bug that no one has really stumbled across. GCC will
try to look in thy system prefix ('/usr/local' f.ex.) into which it is
instaled to find libraries installed along side GCC that should be
preferred to the base system libraries ('/usr' f.ex.). This seems not
unreasonable, but it has a very unfortunate consequence when combined
with a '--sysroot' which does *not* contain the GCC installation we're
using to complete the toolchain. That results in some of the host
system's library directories being searched during the link.
Now, it so happens that most folks doing stuff like this use
'--with-sysroot' and '--disable-multilib' when configuring GCC. Even
better, they're usually not cross-compiling to a target that is similar
to the host. As a result, searching the host for libraries doesn't
really matter -- most of the time weird directories get appended that
don't exist (no arm triple lib directory, etc). Even if you're
cross-compiling from 32-bit to 64-bit x86 or vice-versa, disabling
multilib makes it less likely that you'll actually find viable libraries
on the host. But that's just luck. We shouldn't rely on this, and this
patch disables looking in the system prefix containing the GCC
installation if that system prefix is *outside* of the sysroot. For
empty sysroots, this has no effect. Similarly, when using the GCC
*inside* of the sysroot, we still track wherever it is installed within
the sysroot and look there for libraries. But now we can use a cross
compiler GCC installation outside the system root, and only look for the
crtbegin.o in the GCC installation, and look for all the other libraries
inside the system root.
This should fix PR12478, allowing Clang to be used when building
a ChromiumOS image without polluting the image with libraries from the
host system.
llvm-svn: 154176
2012-04-07 00:32:06 +08:00
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32"
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-05 09:01:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s
|
|
|
|
// CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0{{/|\\\\}}crtbegin.o"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-INSTALL-DIR-32: "-L{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0"
|
2011-10-05 09:01:57 +08:00
|
|
|
//
|
|
|
|
// Check that with 64-bit builds, we don't actually use the install directory
|
|
|
|
// as its version of GCC is lower than our sysrooted version.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-unknown-linux -m64 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-05 09:01:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s
|
|
|
|
// CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-INSTALL-DIR-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
|
2011-10-05 09:01:57 +08:00
|
|
|
// CHECK-INSTALL-DIR-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
2011-10-05 11:09:51 +08:00
|
|
|
//
|
|
|
|
// Check that we support unusual patch version formats, including missing that
|
|
|
|
// component.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s
|
|
|
|
// CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7{{/|\\\\}}crtbegin.o"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION1: "-L{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7"
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s
|
|
|
|
// CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x{{/|\\\\}}crtbegin.o"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION2: "-L{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x"
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s
|
|
|
|
// CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5{{/|\\\\}}crtbegin.o"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION3: "-L{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5"
|
2011-11-06 07:24:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
2011-11-06 07:24:30 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing4/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-11-06 07:24:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION4 %s
|
|
|
|
// CHECK-GCC-VERSION4: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99{{/|\\\\}}crtbegin.o"
|
2011-11-06 07:24:30 +08:00
|
|
|
// CHECK-GCC-VERSION4: "-L{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99"
|
2016-06-18 00:47:14 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i386-unknown-linux -m32 \
|
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing5/bin \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION5 %s
|
|
|
|
// CHECK-GCC-VERSION5: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-GCC-VERSION5: "{{.*}}/Inputs/gcc_version_parsing5/bin/../lib/gcc/i386-unknown-linux/5{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-GCC-VERSION5: "-L{{.*}}/Inputs/gcc_version_parsing5/bin/../lib/gcc/i386-unknown-linux/5"
|
2011-11-09 11:46:20 +08:00
|
|
|
//
|
2014-01-22 06:49:05 +08:00
|
|
|
// Test a simulated installation of libc++ on Linux, both through sysroot and
|
|
|
|
// the installation path of Clang.
|
|
|
|
// RUN: %clangxx -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target x86_64-unknown-linux-gnu \
|
|
|
|
// RUN: -stdlib=libc++ \
|
|
|
|
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-22 06:49:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
|
|
|
|
// CHECK-BASIC-LIBCXX-SYSROOT: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
|
|
|
|
// CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
|
|
|
|
// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
|
|
|
|
// CHECK-BASIC-LIBCXX-SYSROOT: "--sysroot=[[SYSROOT]]"
|
|
|
|
// RUN: %clang -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target x86_64-unknown-linux-gnu \
|
|
|
|
// RUN: -stdlib=libc++ \
|
|
|
|
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-22 06:49:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1"
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "--sysroot=[[SYSROOT]]"
|
|
|
|
// CHECK-BASIC-LIBCXX-INSTALL: "-L[[SYSROOT]]/usr/bin/../lib"
|
|
|
|
//
|
2015-03-07 18:01:29 +08:00
|
|
|
// Test that we can use -stdlib=libc++ in a build system even when it
|
|
|
|
// occasionally links C code instead of C++ code.
|
|
|
|
// RUN: %clang -no-canonical-prefixes -x c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target x86_64-unknown-linux-gnu \
|
|
|
|
// RUN: -stdlib=libc++ \
|
|
|
|
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-C-LINK %s
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK-NOT: warning:
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK-NOT: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1"
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK: "--sysroot=[[SYSROOT]]"
|
|
|
|
// CHECK-BASIC-LIBCXX-C-LINK: "-L[[SYSROOT]]/usr/bin/../lib"
|
|
|
|
//
|
2011-11-09 11:46:20 +08:00
|
|
|
// Test a very broken version of multiarch that shipped in Ubuntu 11.04.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i386-unknown-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-11-09 11:46:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s
|
|
|
|
// CHECK-UBUNTU-11-04: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-UBUNTU-11-04: "{{.*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2011-11-09 11:46:20 +08:00
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../i386-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.."
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib"
|
2011-12-09 04:36:19 +08:00
|
|
|
//
|
2012-07-31 16:06:29 +08:00
|
|
|
// Check multi arch support on Ubuntu 12.04 LTS.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=arm-unknown-linux-gnueabihf \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-07-31 16:06:29 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM-HF %s
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3{{/|\\\\}}crtbegin.o"
|
2012-07-31 16:06:29 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/lib/arm-linux-gnueabihf"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabihf"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../.."
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crtn.o"
|
2013-10-29 02:52:30 +08:00
|
|
|
//
|
2013-10-29 18:27:30 +08:00
|
|
|
// Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabihf.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-gnueabihf \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-10-29 18:27:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM-HF %s
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-dynamic-linker" "{{(/usr/arm--linux-gnueabihf)?}}/lib/ld-linux-armhf.so.3"
|
2013-10-29 18:27:30 +08:00
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crtn.o"
|
|
|
|
//
|
|
|
|
// Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabi.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-gnueabi \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-10-29 18:27:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM %s
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-dynamic-linker" "{{(/usr/arm--linux-gnueabi)?}}/lib/ld-linux.so.3"
|
2013-10-29 18:27:30 +08:00
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/../lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2014-06-20 22:19:02 +08:00
|
|
|
// Check Ubuntu 14.04 on powerpc64le.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64le-unknown-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-06-20 22:19:02 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-PPC64LE %s
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/lib/powerpc64le-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/powerpc64le-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../.."
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2014-07-10 23:27:19 +08:00
|
|
|
// Check Ubuntu 14.04 on x32.
|
|
|
|
// "/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32/crtn.o"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-07-10 23:27:19 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-X32 %s
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/x32"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/lib/../libx32"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu/../../libx32"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.."
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2013-04-14 18:14:21 +08:00
|
|
|
// Check fedora 18 on arm.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=armv7-unknown-linux-gnueabihf \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-04-14 18:14:21 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/fedora_18_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FEDORA-18-ARM-HF %s
|
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-10-29 18:27:30 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crti.o"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtbegin.o"
|
2013-04-14 18:14:21 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2"
|
2013-10-29 18:27:30 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtend.o"
|
2013-10-29 18:27:30 +08:00
|
|
|
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crtn.o"
|
2013-04-14 18:14:21 +08:00
|
|
|
//
|
2014-05-07 00:58:14 +08:00
|
|
|
// Check Fedora 21 on AArch64.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm64-unknown-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-07 00:58:14 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/fedora_21_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64-unknown-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-07 00:58:14 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/fedora_21_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2012-07-31 16:06:29 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=arm-unknown-linux-gnueabi \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-07-31 16:06:29 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM %s
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1{{/|\\\\}}crtbegin.o"
|
2012-07-31 16:06:29 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/lib/arm-linux-gnueabi"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabi"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../.."
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crtn.o"
|
2012-07-31 16:06:29 +08:00
|
|
|
//
|
2011-12-09 04:36:19 +08:00
|
|
|
// Test the setup that shipped in SUSE 10.3 on ppc64.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=powerpc64-suse-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2011-12-09 04:36:19 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64{{/|\\\\}}crtbegin.o"
|
2011-12-09 04:36:19 +08:00
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
2011-12-18 05:57:25 +08:00
|
|
|
//
|
2017-01-11 05:13:08 +08:00
|
|
|
// Check openSuse Leap 42.2 on AArch64
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm64-unknown-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64-unknown-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2017-04-21 20:26:43 +08:00
|
|
|
// Check openSUSE Tumbleweed on armv6hl
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armv6hl-suse-linux-gnueabi \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv6hl_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV6HL %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armv6hl-suse-linux-gnueabi \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv6hl_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV6HL %s
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "-L[[SYSROOT]]/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "-L[[SYSROOT]]/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5/../../../../lib"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}/usr/lib/gcc/armv6hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crtn.o"
|
|
|
|
//
|
|
|
|
// Check openSUSE Tumbleweed on armv7hl
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armv7hl-suse-linux-gnueabi \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv7hl_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV7HL %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armv7hl-suse-linux-gnueabi \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv7hl_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV7HL %s
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5/../../../../lib"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}/usr/lib/gcc/armv7hl-suse-linux-gnueabi/5/../../../../lib{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2012-07-30 19:05:56 +08:00
|
|
|
// Check dynamic-linker for different archs
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=arm-linux-gnueabi \
|
2012-07-30 19:05:56 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARM %s
|
|
|
|
// CHECK-ARM: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-ARM: "-m" "armelf_linux_eabi"
|
|
|
|
// CHECK-ARM: "-dynamic-linker" "{{.*}}/lib/ld-linux.so.3"
|
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2015-07-27 17:56:37 +08:00
|
|
|
// RUN: --target=arm-linux-gnueabi -mfloat-abi=hard \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARM-ABIHF %s
|
|
|
|
// CHECK-ARM-ABIHF: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-ARM-ABIHF: "-m" "armelf_linux_eabi"
|
|
|
|
// CHECK-ARM-ABIHF: "-dynamic-linker" "{{.*}}/lib/ld-linux-armhf.so.3"
|
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=arm-linux-gnueabihf \
|
2012-07-30 19:05:56 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARM-HF %s
|
|
|
|
// CHECK-ARM-HF: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-ARM-HF: "-m" "armelf_linux_eabi"
|
|
|
|
// CHECK-ARM-HF: "-dynamic-linker" "{{.*}}/lib/ld-linux-armhf.so.3"
|
|
|
|
//
|
2014-06-20 22:19:02 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2014-07-28 21:17:52 +08:00
|
|
|
// RUN: --target=powerpc64-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64 %s
|
|
|
|
// CHECK-PPC64: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64: "-m" "elf64ppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.1"
|
2014-07-28 21:17:52 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64-linux-gnu -mabi=elfv1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv1 %s
|
2015-03-12 03:14:15 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64-linux-gnu -mabi=elfv1-qpx \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv1 %s
|
2014-07-28 21:17:52 +08:00
|
|
|
// CHECK-PPC64-ELFv1: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64-ELFv1: "-m" "elf64ppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64-ELFv1: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.1"
|
2014-07-28 21:17:52 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64-linux-gnu -mabi=elfv2 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv2 %s
|
|
|
|
// CHECK-PPC64-ELFv2: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64-ELFv2: "-m" "elf64ppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64-ELFv2: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.2"
|
2014-07-28 21:17:52 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2014-06-20 22:19:02 +08:00
|
|
|
// RUN: --target=powerpc64le-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64LE %s
|
|
|
|
// CHECK-PPC64LE: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64LE: "-m" "elf64lppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64LE: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.2"
|
2014-06-20 22:19:02 +08:00
|
|
|
//
|
2014-07-28 21:17:52 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64le-linux-gnu -mabi=elfv1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64LE-ELFv1 %s
|
|
|
|
// CHECK-PPC64LE-ELFv1: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64LE-ELFv1: "-m" "elf64lppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64LE-ELFv1: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.1"
|
2014-07-28 21:17:52 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64le-linux-gnu -mabi=elfv2 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PPC64LE-ELFv2 %s
|
|
|
|
// CHECK-PPC64LE-ELFv2: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-PPC64LE-ELFv2: "-m" "elf64lppc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-PPC64LE-ELFv2: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld64.so.2"
|
2014-07-28 21:17:52 +08:00
|
|
|
//
|
2017-01-20 00:54:04 +08:00
|
|
|
// Check that we do not pass --hash-style=gnu or --hash-style=both to
|
|
|
|
// hexagon linux linker
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=hexagon-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-HEXAGON %s
|
|
|
|
// CHECK-HEXAGON: "{{.*}}hexagon-link{{(.exe)?}}"
|
|
|
|
// CHECK-HEXAGON-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
2011-12-18 05:57:25 +08:00
|
|
|
// Check that we do not pass --hash-style=gnu and --hash-style=both to linker
|
2012-04-07 04:14:27 +08:00
|
|
|
// and provide correct path to the dynamic linker and emulation mode when build
|
|
|
|
// for MIPS platforms.
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips-linux-gnu \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS %s
|
|
|
|
// CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
|
2012-04-07 04:14:27 +08:00
|
|
|
// CHECK-MIPS: "-m" "elf32btsmip"
|
|
|
|
// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
2011-12-18 05:57:25 +08:00
|
|
|
// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
|
2014-06-24 23:04:16 +08:00
|
|
|
//
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mipsel-linux-gnu \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s
|
|
|
|
// CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
|
2012-04-07 04:14:27 +08:00
|
|
|
// CHECK-MIPSEL: "-m" "elf32ltsmip"
|
|
|
|
// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
2011-12-18 05:57:25 +08:00
|
|
|
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
|
2014-06-24 23:04:16 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mnan=2008 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL-NAN2008 %s
|
|
|
|
// CHECK-MIPSEL-NAN2008: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPSEL-NAN2008: "-m" "elf32ltsmip"
|
|
|
|
// CHECK-MIPSEL-NAN2008: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1"
|
|
|
|
// CHECK-MIPSEL-NAN2008-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mcpu=mips32r6 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS32R6EL %s
|
|
|
|
// CHECK-MIPS32R6EL: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS32R6EL: "-m" "elf32ltsmip"
|
|
|
|
// CHECK-MIPS32R6EL: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1"
|
|
|
|
// CHECK-MIPS32R6EL-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64-linux-gnu \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s
|
|
|
|
// CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}"
|
2012-04-07 04:14:27 +08:00
|
|
|
// CHECK-MIPS64: "-m" "elf64btsmip"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld.so.1"
|
2011-12-18 05:57:25 +08:00
|
|
|
// CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}"
|
2014-06-24 23:04:16 +08:00
|
|
|
//
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s
|
|
|
|
// CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}"
|
2012-04-07 04:14:27 +08:00
|
|
|
// CHECK-MIPS64EL: "-m" "elf64ltsmip"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64EL: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld.so.1"
|
2011-12-18 05:57:25 +08:00
|
|
|
// CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}"
|
2014-06-24 23:04:16 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mnan=2008 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-NAN2008 %s
|
|
|
|
// CHECK-MIPS64EL-NAN2008: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64EL-NAN2008: "-m" "elf64ltsmip"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64EL-NAN2008: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld-linux-mipsn8.so.1"
|
2014-06-24 23:04:16 +08:00
|
|
|
// CHECK-MIPS64EL-NAN2008-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mcpu=mips64r6 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64R6EL %s
|
|
|
|
// CHECK-MIPS64R6EL: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64R6EL: "-m" "elf64ltsmip"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64R6EL: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld-linux-mipsn8.so.1"
|
2014-06-24 23:04:16 +08:00
|
|
|
// CHECK-MIPS64R6EL-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64-linux-gnu -mabi=n32 \
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64-N32 %s
|
|
|
|
// CHECK-MIPS64-N32: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64-N32: "-m" "elf32btsmipn32"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64-N32: "-dynamic-linker" "{{.*}}/lib{{(32)?}}/ld.so.1"
|
2012-10-21 19:44:57 +08:00
|
|
|
// CHECK-MIPS64-N32-NOT: "--hash-style={{gnu|both}}"
|
2014-06-24 23:04:16 +08:00
|
|
|
//
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu -mabi=n32 \
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-N32 %s
|
|
|
|
// CHECK-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64EL-N32: "-m" "elf32ltsmipn32"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64EL-N32: "-dynamic-linker" "{{.*}}/lib{{(32)?}}/ld.so.1"
|
2012-10-21 19:44:57 +08:00
|
|
|
// CHECK-MIPS64EL-N32-NOT: "--hash-style={{gnu|both}}"
|
2012-02-26 17:03:21 +08:00
|
|
|
//
|
2014-06-24 23:04:16 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mabi=n32 \
|
|
|
|
// RUN: -mnan=2008 | FileCheck --check-prefix=CHECK-MIPS64EL-N32-NAN2008 %s
|
|
|
|
// CHECK-MIPS64EL-N32-NAN2008: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64EL-N32-NAN2008: "-m" "elf32ltsmipn32"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64EL-N32-NAN2008: "-dynamic-linker" "{{.*}}/lib{{(32)?}}/ld-linux-mipsn8.so.1"
|
2014-06-24 23:04:16 +08:00
|
|
|
// CHECK-MIPS64EL-N32-NAN2008-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
2016-05-16 19:53:51 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-redhat-linux \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-REDHAT %s
|
|
|
|
// CHECK-MIPS64EL-REDHAT: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64EL-REDHAT: "-m" "elf64ltsmip"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-MIPS64EL-REDHAT: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld.so.1"
|
|
|
|
// CHECK-MIPS64EL-REDHAT-NOT: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld-musl-mipsel.so.1"
|
2016-05-16 19:53:51 +08:00
|
|
|
// CHECK-MIPS64EL-REDHAT-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
//
|
2014-01-10 11:51:33 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2015-05-11 23:21:44 +08:00
|
|
|
// RUN: --target=sparc-unknown-linux-gnu \
|
2014-01-10 11:51:33 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SPARCV8 %s
|
|
|
|
// CHECK-SPARCV8: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-SPARCV8: "-m" "elf32_sparc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-SPARCV8: "-dynamic-linker" "{{(/usr/sparc-unknown-linux-gnu)?}}/lib/ld-linux.so.2"
|
2014-01-10 11:51:33 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2015-05-11 23:21:44 +08:00
|
|
|
// RUN: --target=sparcel-unknown-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SPARCV8EL %s
|
|
|
|
// CHECK-SPARCV8EL: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-SPARCV8EL: "-m" "elf32_sparc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-SPARCV8EL: "-dynamic-linker" "{{(/usr/sparcel-unknown-linux-gnu)?}}/lib/ld-linux.so.2"
|
2015-05-11 23:21:44 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=sparcv9-unknown-linux-gnu \
|
2014-01-10 11:51:33 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SPARCV9 %s
|
|
|
|
// CHECK-SPARCV9: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-SPARCV9: "-m" "elf64_sparc"
|
2016-05-23 10:17:28 +08:00
|
|
|
// CHECK-SPARCV9: "-dynamic-linker" "{{(/usr/sparcv9-unknown-linux-gnu)?}}/lib{{(64)?}}/ld-linux.so.2"
|
2014-01-10 11:51:33 +08:00
|
|
|
//
|
2012-02-26 17:03:21 +08:00
|
|
|
// Thoroughly exercise the Debian multiarch environment.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=i686-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-02-26 17:03:21 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86 %s
|
|
|
|
// CHECK-DEBIAN-X86: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-X86: "{{.*}}/usr/lib/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-02-26 17:03:21 +08:00
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../../i386-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=x86_64-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-02-26 17:03:21 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86-64 %s
|
|
|
|
// CHECK-DEBIAN-X86-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-X86-64: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-02-26 17:03:21 +08:00
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../../x86_64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=powerpc-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-02-26 17:03:21 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC %s
|
|
|
|
// CHECK-DEBIAN-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-PPC: "{{.*}}/usr/lib/gcc/powerpc-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-02-26 17:03:21 +08:00
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../../powerpc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/powerpc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2015-06-27 02:37:15 +08:00
|
|
|
// RUN: --target=powerpc64le-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64LE %s
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.5/../../../powerpc64le-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/usr/lib/powerpc64le-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-PPC64LE: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=powerpc64-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-02-26 17:03:21 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64 %s
|
|
|
|
// CHECK-DEBIAN-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-02-26 17:03:21 +08:00
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../../powerpc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/powerpc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib"
|
2012-04-26 16:35:58 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-04-26 16:35:58 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS %s
|
|
|
|
// CHECK-DEBIAN-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPS: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-04-26 16:35:58 +08:00
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../../mips-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/mips-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mipsel-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-04-26 16:35:58 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPSEL %s
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5{{/|\\\\}}crtbegin.o"
|
2012-04-26 16:35:58 +08:00
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../../mipsel-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/mipsel-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib"
|
2012-04-27 03:57:02 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-04-27 03:57:02 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64 %s
|
|
|
|
// CHECK-DEBIAN-MIPS64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/64{{/|\\\\}}crtbegin.o"
|
2012-04-27 03:57:02 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/64"
|
|
|
|
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-04-27 03:57:02 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64EL %s
|
|
|
|
// CHECK-DEBIAN-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/64{{/|\\\\}}crtbegin.o"
|
2012-04-27 03:57:02 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/64"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib"
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64-linux-gnu -mabi=n32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64-N32 %s
|
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/n32{{/|\\\\}}crtbegin.o"
|
2012-10-21 19:44:57 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/n32"
|
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu -mabi=n32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64EL-N32 %s
|
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/n32{{/|\\\\}}crtbegin.o"
|
2012-10-21 19:44:57 +08:00
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/n32"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib"
|
2012-02-26 17:03:21 +08:00
|
|
|
//
|
2015-06-05 21:44:43 +08:00
|
|
|
// Check linker paths on Debian 8 / Sparc
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=sparc-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32 %s
|
|
|
|
// CHECK-DEBIAN-SPARC32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9{{/|\\\\}}crtbegin.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/lib/sparc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib/sparc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "-L[[SYSROOT]]/usr/lib"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../sparc-linux-gnu{{/|\\\\}}crtn.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
//
|
|
|
|
// Check linker paths on Debian 8 / Sparc, with the oldstyle multilib packages
|
|
|
|
// RUN: %clang -no-canonical-prefixes -m64 %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=sparc-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_8_sparc_multilib_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC32-LIB64 %s
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64{{/|\\\\}}crtbegin.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "-L[[SYSROOT]]/usr/lib"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/64{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-DEBIAN-SPARC32-LIB64: "[[SYSROOT]]/usr/lib/gcc/sparc-linux-gnu/4.9/../../../../lib64{{/|\\\\}}crtn.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
//
|
|
|
|
// Check linker paths on Debian 8 / Sparc64
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=sparc64-linux-gnu \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_8_sparc64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-SPARC64 %s
|
|
|
|
// CHECK-DEBIAN-SPARC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9{{/|\\\\}}crtbegin.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib/sparc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/sparc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../.."
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "-L[[SYSROOT]]/usr/lib"
|
2015-06-05 22:16:39 +08:00
|
|
|
// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-DEBIAN-SPARC64: "[[SYSROOT]]/usr/lib/gcc/sparc64-linux-gnu/4.9/../../../sparc64-linux-gnu{{/|\\\\}}crtn.o"
|
2015-06-05 21:44:43 +08:00
|
|
|
//
|
2012-04-25 16:59:22 +08:00
|
|
|
// Test linker invocation on Android.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-androideabi -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-04-25 16:59:22 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=aarch64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-23 21:36:23 +08:00
|
|
|
// 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 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-30 18:52:05 +08:00
|
|
|
// 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 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mipsel-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mips64el-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-26 00:04:08 +08:00
|
|
|
// 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 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=i686-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtbegin_dynamic.o"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-ANDROID-NOT: "gcc_s"
|
|
|
|
// CHECK-ANDROID: "-lgcc"
|
2012-11-19 20:04:11 +08:00
|
|
|
// CHECK-ANDROID: "-ldl"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-NOT: "gcc_s"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtend_android.o"
|
2012-04-25 16:59:22 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-androideabi -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-04-25 16:59:22 +08:00
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=aarch64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-23 21:36:23 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm64-linux-android -rtlib=platform \
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mipsel-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mips64el-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-26 00:04:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=i686-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-SO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2014-07-16 16:46:35 +08:00
|
|
|
// CHECK-ANDROID-SO-NOT: "-Bsymbolic"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtbegin_so.o"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-SO: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-ANDROID-SO-NOT: "gcc_s"
|
|
|
|
// CHECK-ANDROID-SO: "-lgcc"
|
2012-11-19 20:04:11 +08:00
|
|
|
// CHECK-ANDROID-SO: "-ldl"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-SO-NOT: "gcc_s"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtend_so.o"
|
2012-04-25 16:59:22 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-androideabi -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-04-25 16:59:22 +08:00
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-android -rtlib=platform \
|
2012-09-03 17:05:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
2012-09-02 17:30:11 +08:00
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=aarch64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-23 21:36:23 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm64-linux-android -rtlib=platform \
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mipsel-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mips64el-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-26 00:04:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=i686-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -static \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-STATIC: "{{.*}}{{/|\\\\}}crtbegin_static.o"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-STATIC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-ANDROID-STATIC-NOT: "gcc_s"
|
|
|
|
// CHECK-ANDROID-STATIC: "-lgcc"
|
2012-11-19 20:04:11 +08:00
|
|
|
// CHECK-ANDROID-STATIC-NOT: "-ldl"
|
2012-04-25 16:59:22 +08:00
|
|
|
// CHECK-ANDROID-STATIC-NOT: "gcc_s"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-STATIC: "{{.*}}{{/|\\\\}}crtend_android.o"
|
2012-09-10 18:30:12 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-androideabi -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-10 18:30:12 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-10 18:30:12 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=aarch64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-23 21:36:23 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=arm64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mipsel-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-04 01:46:38 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=mips64el-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-26 00:04:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=i686-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-11-03 04:41:30 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: --target=x86_64-linux-android -rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -pie \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
|
2012-09-10 18:30:12 +08:00
|
|
|
// CHECK-ANDROID-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtbegin_dynamic.o"
|
2012-09-10 18:30:12 +08:00
|
|
|
// CHECK-ANDROID-PIE: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-ANDROID-PIE-NOT: "gcc_s"
|
|
|
|
// CHECK-ANDROID-PIE: "-lgcc"
|
|
|
|
// CHECK-ANDROID-PIE-NOT: "gcc_s"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtend_android.o"
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi \
|
2015-03-04 02:24:57 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm64-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mipsel-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64el-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i686-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-linux-android \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s
|
|
|
|
// CHECK-ANDROID-NO-DEFAULT-PIE-NOT: -pie
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mipsel-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-04-23 21:36:23 +08:00
|
|
|
// RUN: --target=aarch64-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-23 21:36:23 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: --target=arm64-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-01-26 00:04:08 +08:00
|
|
|
// RUN: --target=mips64el-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-26 00:04:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --target=i686-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-linux-android \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-01-23 17:08:32 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
|
|
|
|
// CHECK-ANDROID-32: "-dynamic-linker" "/system/bin/linker"
|
|
|
|
// CHECK-ANDROID-64: "-dynamic-linker" "/system/bin/linker64"
|
2012-09-14 19:27:24 +08:00
|
|
|
//
|
2014-05-28 20:53:34 +08:00
|
|
|
// Test that -pthread does not add -lpthread on Android.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mipsel-linux-android -pthread \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64el-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i686-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mipsel-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64el-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i686-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-linux-android -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-05-28 20:53:34 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: -shared \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
|
|
|
// CHECK-ANDROID-PTHREAD-NOT: -lpthread
|
|
|
|
//
|
2014-06-05 19:41:39 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %t.o -### -o %t 2>&1 \
|
|
|
|
// RUN: --target=arm-linux-androideabi -pthread \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-06-05 19:41:39 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s
|
|
|
|
// CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread'
|
|
|
|
//
|
2012-09-14 19:27:24 +08:00
|
|
|
// Check linker invocation on Debian 6 MIPS 32/64-bit.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mipsel-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-14 19:27:24 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_6_mips_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPSEL %s
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4{{/|\\\\}}crtbegin.o"
|
2012-09-14 19:27:24 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/lib/../lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/../lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.."
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-14 19:27:24 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_6_mips_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL %s
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/64{{/|\\\\}}crtbegin.o"
|
2012-09-14 19:27:24 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.."
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib"
|
2012-09-19 06:25:07 +08:00
|
|
|
//
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=mips64el-linux-gnu -mabi=n32 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-21 19:44:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_6_mips_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-N32 %s
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/n32{{/|\\\\}}crtbegin.o"
|
2012-10-21 19:44:57 +08:00
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/n32"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.."
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
2014-06-25 03:00:12 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64-linux-gnuabi64 -mabi=n64 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-06-25 03:00:12 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib/mips64-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../.."
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crtn.o"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64el-linux-gnuabi64 -mabi=n64 \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-06-25 03:00:12 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crti.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib/mips64el-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64el-linux-gnuabi64"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../.."
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtend.o"
|
|
|
|
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crtn.o"
|
|
|
|
//
|
2012-09-19 06:25:07 +08:00
|
|
|
// Test linker invocation for Freescale SDK (OpenEmbedded).
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=powerpc-fsl-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-19 06:25:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/freescale_ppc_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FSL-PPC %s
|
|
|
|
// CHECK-FSL-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-FSL-PPC: "-m" "elf32ppclinux"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-FSL-PPC: "{{.*}}{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-FSL-PPC: "{{.*}}{{/|\\\\}}crtbegin.o"
|
2012-09-19 06:25:07 +08:00
|
|
|
// CHECK-FSL-PPC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: --target=powerpc64-fsl-linux \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-09-19 06:25:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/freescale_ppc64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-FSL-PPC64 %s
|
|
|
|
// CHECK-FSL-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-FSL-PPC64: "-m" "elf64ppc"
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-FSL-PPC64: "{{.*}}{{/|\\\\}}crt1.o"
|
|
|
|
// CHECK-FSL-PPC64: "{{.*}}{{/|\\\\}}crtbegin.o"
|
2012-09-19 06:25:07 +08:00
|
|
|
// CHECK-FSL-PPC64: "-L[[SYSROOT]]/usr/lib64/powerpc64-fsl-linux/4.6.2/../.."
|
2012-10-05 03:42:20 +08:00
|
|
|
//
|
2014-03-26 02:02:07 +08:00
|
|
|
// Check that crtfastmath.o is linked with -ffast-math and with -Ofast.
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-05 03:42:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -ffast-math \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-05 03:42:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -funsafe-math-optimizations\
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-05 03:42:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast\
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -O3\
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
|
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -O3 -Ofast\
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -ffast-math -fno-fast-math \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-05 03:42:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -fno-fast-math \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -fno-unsafe-math-optimizations \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -fno-fast-math -Ofast \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
|
|
|
// RUN: %clang --target=x86_64-unknown-linux -### %s -fno-unsafe-math-optimizations -Ofast \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-03-26 02:02:07 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
|
2012-10-05 03:42:20 +08:00
|
|
|
// We don't have crtfastmath.o in the i386 tree, use it to check that file
|
|
|
|
// detection works.
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang --target=i386-unknown-linux -### %s -ffast-math \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2012-10-05 03:42:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
|
2013-06-25 06:07:15 +08:00
|
|
|
// CHECK-CRTFASTMATH: usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtfastmath.o
|
2012-10-05 03:42:20 +08:00
|
|
|
// CHECK-NOCRTFASTMATH-NOT: crtfastmath.o
|
2013-06-08 07:25:01 +08:00
|
|
|
|
|
|
|
// Check that we link in gcrt1.o when compiling with -pg
|
2013-06-20 17:42:40 +08:00
|
|
|
// RUN: %clang -pg --target=x86_64-unknown-linux -### %s \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2013-06-08 07:25:01 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-PG %s
|
|
|
|
// CHECK-PG: gcrt1.o
|
2014-06-26 09:08:54 +08:00
|
|
|
|
|
|
|
// GCC forwards -u to the linker.
|
|
|
|
// RUN: %clang -u asdf --target=x86_64-unknown-linux -### %s \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-06-26 09:08:54 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-u %s
|
|
|
|
// CHECK-u: "-u" "asdf"
|
2015-01-29 07:30:39 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armeb-unknown-linux \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARMEB %s
|
|
|
|
// CHECK-ARMEB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-ARMEB-NOT: "--be8"
|
2016-06-11 00:09:20 +08:00
|
|
|
// CHECK-ARMEB: "-m" "armelfb_linux_eabi"
|
2015-01-29 07:30:39 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armebv7-unknown-linux \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EB %s
|
|
|
|
// CHECK-ARMV7EB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-ARMV7EB: "--be8"
|
2016-06-11 00:09:20 +08:00
|
|
|
// CHECK-ARMV7EB: "-m" "armelfb_linux_eabi"
|
2016-06-14 20:47:24 +08:00
|
|
|
|
|
|
|
// Check dynamic-linker for musl-libc
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i386-pc-linux-musl \
|
2016-06-16 04:02:22 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-X86 %s
|
2016-06-14 20:47:24 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-pc-linux-musl \
|
2016-06-16 04:02:22 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-X86_64 %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mipsel-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPSEL %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS64 %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=mips64el-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS64EL %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=powerpc64-pc-linux-musl \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s
|
2016-06-25 05:35:06 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=thumb-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=thumb-pc-linux-musleabihf \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-08-08 16:27:36 +08:00
|
|
|
// RUN: --target=thumbv7-pc-linux-musleabi -mhard-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-06-25 05:35:06 +08:00
|
|
|
// RUN: --target=thumbeb-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=thumbeb-pc-linux-musleabihf \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-08-08 16:27:36 +08:00
|
|
|
// RUN: --target=thumbv7eb-pc-linux-musleabi -mhard-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-06-25 05:35:06 +08:00
|
|
|
// RUN: --target=arm-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=arm-pc-linux-musleabihf \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-08-08 16:27:36 +08:00
|
|
|
// RUN: --target=armv7-pc-linux-musleabi -mhard-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-06-25 05:35:06 +08:00
|
|
|
// RUN: --target=armeb-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=armeb-pc-linux-musleabihf \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-08-08 16:27:36 +08:00
|
|
|
// RUN: --target=armv7eb-pc-linux-musleabi -mhard-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2016-06-25 05:35:06 +08:00
|
|
|
// RUN: --target=aarch64-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=aarch64_be-pc-linux-musleabi \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64_BE %s
|
|
|
|
// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1"
|
|
|
|
// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1"
|
|
|
|
// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1"
|
|
|
|
// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1"
|
|
|
|
// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1"
|
|
|
|
// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1"
|
|
|
|
// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1"
|
|
|
|
// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1"
|
|
|
|
// CHECK-MUSL-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
|
|
|
|
// CHECK-MUSL-ARMHF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1"
|
|
|
|
// CHECK-MUSL-ARMEB: "-dynamic-linker" "/lib/ld-musl-armeb.so.1"
|
|
|
|
// CHECK-MUSL-ARMEBHF: "-dynamic-linker" "/lib/ld-musl-armebhf.so.1"
|
|
|
|
// CHECK-MUSL-AARCH64: "-dynamic-linker" "/lib/ld-musl-aarch64.so.1"
|
|
|
|
// CHECK-MUSL-AARCH64_BE: "-dynamic-linker" "/lib/ld-musl-aarch64_be.so.1"
|
2016-12-12 23:07:43 +08:00
|
|
|
|
|
|
|
// Check whether multilib gcc install works fine on Gentoo with gcc-config
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-unknown-linux-gnu -rtlib=platform \
|
|
|
|
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO %s
|
|
|
|
// CHECK-LD-GENTOO-NOT: warning:
|
|
|
|
// CHECK-LD-GENTOO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-GENTOO: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-GENTOO: "-m" "elf_x86_64"
|
|
|
|
// CHECK-LD-GENTOO: "-dynamic-linker"
|
2016-12-13 00:04:37 +08:00
|
|
|
// CHECK-LD-GENTOO: "{{.*}}/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3{{/|\\\\}}crtbegin.o"
|
2016-12-12 23:07:43 +08:00
|
|
|
// CHECK-LD-GENTOO: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3"
|
|
|
|
// CHECK-LD-GENTOO: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/lib"
|
|
|
|
// CHECK-LD-GENTOO: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../.."
|
|
|
|
// CHECK-LD-GENTOO: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// CHECK-LD-GENTOO: "-lc"
|
|
|
|
// CHECK-LD-GENTOO: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=i686-unknown-linux-gnu -rtlib=platform \
|
|
|
|
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO-32 %s
|
|
|
|
// CHECK-LD-GENTOO-32-NOT: warning:
|
|
|
|
// CHECK-LD-GENTOO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-GENTOO-32: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-GENTOO-32: "-m" "elf_i386"
|
|
|
|
// CHECK-LD-GENTOO-32: "-dynamic-linker"
|
2016-12-13 00:04:37 +08:00
|
|
|
// CHECK-LD-GENTOO-32: "{{.*}}/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32{{/|\\\\}}crtbegin.o"
|
2016-12-12 23:07:43 +08:00
|
|
|
// CHECK-LD-GENTOO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32"
|
|
|
|
// CHECK-LD-GENTOO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/lib"
|
|
|
|
// CHECK-LD-GENTOO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../.."
|
|
|
|
// CHECK-LD-GENTOO-32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// CHECK-LD-GENTOO-32: "-lc"
|
|
|
|
// CHECK-LD-GENTOO-32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform \
|
|
|
|
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO-X32 %s
|
|
|
|
// CHECK-LD-GENTOO-X32-NOT: warning:
|
|
|
|
// CHECK-LD-GENTOO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-LD-GENTOO-X32: "--eh-frame-hdr"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-m" "elf32_x86_64"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-dynamic-linker"
|
2016-12-13 00:04:37 +08:00
|
|
|
// CHECK-LD-GENTOO-X32: "{{.*}}/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/x32{{/|\\\\}}crtbegin.o"
|
2016-12-12 23:07:43 +08:00
|
|
|
// CHECK-LD-GENTOO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/x32"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/lib"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../.."
|
|
|
|
// CHECK-LD-GENTOO-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-lc"
|
|
|
|
// CHECK-LD-GENTOO-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
|