2015-09-01 03:17:51 +08:00
|
|
|
// Test ld invocation on Solaris targets.
|
|
|
|
|
|
|
|
// Check sparc-sun-solaris2.1
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: --target=sparc-sun-solaris2.11 \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/sparc-sun-solaris2.11 \
|
|
|
|
// RUN: | FileCheck %s
|
|
|
|
// CHECK: "-cc1" "-triple" "sparc-sun-solaris2.11"
|
|
|
|
// CHECK: ld{{.*}}"
|
|
|
|
// CHECK: "--dynamic-linker" "{{.*}}/usr/lib/ld.so.1"
|
2015-09-01 09:29:13 +08:00
|
|
|
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crt1.o"
|
2015-09-01 03:17:51 +08:00
|
|
|
// CHECK: "{{.*}}/usr/lib/crti.o"
|
2015-09-01 09:29:13 +08:00
|
|
|
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtend.o"
|
2015-09-01 03:17:51 +08:00
|
|
|
// CHECK: "{{.*}}/usr/lib/crtn.o"
|
2015-09-15 03:30:53 +08:00
|
|
|
// CHECK "-lc"
|
|
|
|
// CHECK "-lgcc_s"
|
|
|
|
// CHECK "-lgcc"
|
|
|
|
// CHECK "-lm"
|
|
|
|
|
|
|
|
// Check the right -l flags are present with -shared
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o -shared 2>&1 \
|
|
|
|
// RUN: --target=sparc-sun-solaris2.11 \
|
|
|
|
// RUN: --gcc-toolchain="" \
|
|
|
|
// RUN: --sysroot=%S/Inputs/sparc-sun-solaris2.11 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SHARED %s
|
|
|
|
|
|
|
|
// CHECK-SHARED: ld{{.*}}"
|
|
|
|
// CHECK-SHARED "-lc"
|
|
|
|
// CHECK-SHARED "-lgcc_s"
|
|
|
|
// CHECK-SHARED-NOT "-lgcc"
|
|
|
|
// CHECK-SHARED-NOT: "-lm"
|