add support for detecting pcc's compiler runtime
[musl] / configure
index c1bcac7..19c241e 100755 (executable)
--- a/configure
+++ b/configure
@@ -269,8 +269,8 @@ tryflag CFLAGS_AUTO -falign-jumps=1
 # work anyway (issues with atomic ops).
 #
 if test "$ARCH" = "i386" ; then
-fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryflag CFLAGS_AUTO -march=i486
-fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryflag CFLAGS_AUTO -mtune=generic
+fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
+fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
 fi
 
 if test "x$warnings" = xyes ; then
@@ -299,6 +299,7 @@ shared=no
 # Find compiler runtime library
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
+test -z "$LIBCC" && tryldflag LIBCC -lpcc
 printf "using compiler runtime libraries: %s\n" "$LIBCC"