|
26 | 26 | // CHECK-GLD: "--as-needed" "-lgcc_s" "--no-as-needed"
|
27 | 27 | // CHECK-LD-SPARC32-SAME: "-lc"
|
28 | 28 | // CHECK-LD-SPARC32-SAME: "-lgcc"
|
29 |
| -// CHECK-LD-SPARC32-SAME: "-lm" |
30 | 29 | // CHECK-LD-SPARC32-SAME: "[[SYSROOT]]/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtend.o"
|
31 | 30 | // CHECK-LD-SPARC32-SAME: "[[SYSROOT]]/usr/lib{{/|\\\\}}crtn.o"
|
32 | 31 |
|
|
49 | 48 | // CHECK-LD-SPARC64-SAME: "-lgcc_s"
|
50 | 49 | // CHECK-LD-SPARC64-SAME: "-lc"
|
51 | 50 | // CHECK-LD-SPARC64-SAME: "-lgcc"
|
52 |
| -// CHECK-LD-SPARC64-SAME: "-lm" |
53 | 51 | // CHECK-LD-SPARC64-SAME: "[[SYSROOT]]/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/sparcv9{{/|\\\\}}crtend.o"
|
54 | 52 | // CHECK-LD-SPARC64-SAME: "[[SYSROOT]]/usr/lib/sparcv9{{/|\\\\}}crtn.o"
|
55 | 53 |
|
|
72 | 70 | // CHECK-LD-X32-SAME: "-lgcc_s"
|
73 | 71 | // CHECK-LD-X32-SAME: "-lc"
|
74 | 72 | // CHECK-LD-X32-SAME: "-lgcc"
|
75 |
| -// CHECK-LD-X32-SAME: "-lm" |
76 | 73 | // CHECK-LD-X32-SAME: "[[SYSROOT]]/usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4{{/|\\\\}}crtend.o"
|
77 | 74 | // CHECK-LD-X32-SAME: "[[SYSROOT]]/usr/lib{{/|\\\\}}crtn.o"
|
78 | 75 |
|
|
96 | 93 | // CHECK-LD-X64-SAME: "-lgcc_s"
|
97 | 94 | // CHECK-LD-X64-SAME: "-lc"
|
98 | 95 | // CHECK-LD-X64-SAME: "-lgcc"
|
99 |
| -// CHECK-LD-X64-SAME: "-lm" |
100 | 96 | // CHECK-LD-X64-SAME: "[[SYSROOT]]/usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4/amd64{{/|\\\\}}crtend.o"
|
101 | 97 | // CHECK-LD-X64-SAME: "[[SYSROOT]]/usr/lib/amd64{{/|\\\\}}crtn.o"
|
102 | 98 |
|
|
110 | 106 | // CHECK-SPARC32-SHARED-SAME: "-lgcc_s"
|
111 | 107 | // CHECK-SPARC32-SHARED-SAME: "-lc"
|
112 | 108 | // CHECK-SPARC32-SHARED-NOT: "-lgcc"
|
113 |
| -// CHECK-SPARC32-SHARED-NOT: "-lm" |
| 109 | + |
| 110 | +// Check that libm is only linked with clang++. |
| 111 | +// RUN: %clang -### %s --target=sparc-sun-solaris2.11 \ |
| 112 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 113 | +// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s |
| 114 | +// RUN: %clang -### %s -shared --target=sparc-sun-solaris2.11 \ |
| 115 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 116 | +// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s |
| 117 | +// RUN: %clangxx -### %s --target=sparc-sun-solaris2.11 \ |
| 118 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 119 | +// RUN: | FileCheck --check-prefix=CHECK-LIBM %s |
| 120 | +// RUN: %clangxx -### %s -shared --target=sparc-sun-solaris2.11 \ |
| 121 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 122 | +// RUN: | FileCheck --check-prefix=CHECK-LIBM %s |
| 123 | +// CHECK-LIBM: "-lm" |
| 124 | +// CHECK-NOLIBM-NOT: "-lm" |
114 | 125 |
|
115 | 126 | // Check the right ld flags are present with -pie.
|
116 | 127 | // RUN: %clang --target=sparc-sun-solaris2.11 -### %s -pie -fuse-ld= \
|
|
0 commit comments