fix detection of LIBCC for compiler-rt with clang
[musl] / configure
index 501a721..1e59c46 100755 (executable)
--- a/configure
+++ b/configure
@@ -598,6 +598,8 @@ tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions
 # Find compiler runtime library
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
+test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
+                 && tryldflag LIBCC "$try_libcc"
 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
                  && tryldflag LIBCC "$try_libcc"
 printf "using compiler runtime libraries: %s\n" "$LIBCC"