Add libm to libc only for GLIBC.
@@ -60,7 +60,13 @@ static double llvm_fabs_f64 (double v) { return fabs (v); }
static struct lib {
char *name;
void *handler;
-} libs[] = {{"/lib64/libc.so.6", NULL}, {"/lib64/libm.so.6", NULL}};
+} libs[] = {
+#ifdef __GLIBC__
+ {"/lib64/libc.so.6", NULL}, {"/lib64/libm.so.6", NULL}
+#else
+ {"/lib/libc.so", NULL},
+#endif
+};
static void close_libs (void) {
for (int i = 0; i < sizeof (libs) / sizeof (struct lib); i++)
