|
20 | 20 | // CHECK-LD-SPARC32-SAME: "-lgcc_s"
|
21 | 21 | // CHECK-LD-SPARC32-SAME: "-lc"
|
22 | 22 | // CHECK-LD-SPARC32-SAME: "-lgcc"
|
23 |
| -// CHECK-LD-SPARC32-SAME: "-lm" |
24 | 23 | // CHECK-LD-SPARC32-SAME: "[[SYSROOT]]/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtend.o"
|
25 | 24 | // CHECK-LD-SPARC32-SAME: "[[SYSROOT]]/usr/lib{{/|\\\\}}crtn.o"
|
26 | 25 |
|
|
43 | 42 | // CHECK-LD-SPARC64-SAME: "-lgcc_s"
|
44 | 43 | // CHECK-LD-SPARC64-SAME: "-lc"
|
45 | 44 | // CHECK-LD-SPARC64-SAME: "-lgcc"
|
46 |
| -// CHECK-LD-SPARC64-SAME: "-lm" |
47 | 45 | // CHECK-LD-SPARC64-SAME: "[[SYSROOT]]/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/sparcv9{{/|\\\\}}crtend.o"
|
48 | 46 | // CHECK-LD-SPARC64-SAME: "[[SYSROOT]]/usr/lib/sparcv9{{/|\\\\}}crtn.o"
|
49 | 47 |
|
|
66 | 64 | // CHECK-LD-X32-SAME: "-lgcc_s"
|
67 | 65 | // CHECK-LD-X32-SAME: "-lc"
|
68 | 66 | // CHECK-LD-X32-SAME: "-lgcc"
|
69 |
| -// CHECK-LD-X32-SAME: "-lm" |
70 | 67 | // CHECK-LD-X32-SAME: "[[SYSROOT]]/usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4{{/|\\\\}}crtend.o"
|
71 | 68 | // CHECK-LD-X32-SAME: "[[SYSROOT]]/usr/lib{{/|\\\\}}crtn.o"
|
72 | 69 |
|
|
90 | 87 | // CHECK-LD-X64-SAME: "-lgcc_s"
|
91 | 88 | // CHECK-LD-X64-SAME: "-lc"
|
92 | 89 | // CHECK-LD-X64-SAME: "-lgcc"
|
93 |
| -// CHECK-LD-X64-SAME: "-lm" |
94 | 90 | // CHECK-LD-X64-SAME: "[[SYSROOT]]/usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4/amd64{{/|\\\\}}crtend.o"
|
95 | 91 | // CHECK-LD-X64-SAME: "[[SYSROOT]]/usr/lib/amd64{{/|\\\\}}crtn.o"
|
96 | 92 |
|
|
104 | 100 | // CHECK-SPARC32-SHARED-SAME: "-lgcc_s"
|
105 | 101 | // CHECK-SPARC32-SHARED-SAME: "-lc"
|
106 | 102 | // CHECK-SPARC32-SHARED-NOT: "-lgcc"
|
107 |
| -// CHECK-SPARC32-SHARED-NOT: "-lm" |
| 103 | + |
| 104 | +// Check that libm is only linked with clang++. |
| 105 | +// RUN: %clang -### %s --target=sparc-sun-solaris2.11 \ |
| 106 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 107 | +// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s |
| 108 | +// RUN: %clang -### %s -shared --target=sparc-sun-solaris2.11 \ |
| 109 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 110 | +// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s |
| 111 | +// RUN: %clangxx -### %s --target=sparc-sun-solaris2.11 \ |
| 112 | +// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ |
| 113 | +// RUN: | FileCheck --check-prefix=CHECK-LIBM %s |
| 114 | +// RUN: %clangxx -### %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-LIBM %s |
| 117 | +// CHECK-LIBM: "-lm" |
| 118 | +// CHECK-NOLIBM-NOT: "-lm" |
108 | 119 |
|
109 | 120 | // Check the right ld flags are present with -pie.
|
110 | 121 | // RUN: %clang --target=sparc-sun-solaris2.11 -### %s -pie \
|
|
0 commit comments