diff --git a/configure b/configure index 93518a7..cafb64f 100755 --- a/configure +++ b/configure @@ -83,6 +83,21 @@ return 1 fi } +tryccprint () { +printf "checking CC -print-file-name for %s... " "$2" +CC_FILE="`$CC -print-file-name=$2`" +L="-L`dirname $CC_FILE` `basename $CC_FILE .a |sed -e 's/^lib/-l/'`" +echo "typedef int x;" > "$tmpc" +if "$CC" -nostdlib -shared "$L" -o /dev/null "$tmpc" 2>/dev/null ; then +printf "yes\n" +eval "$1=\"\${$1} \$L\"" +eval "$1=\${$1# }" +return 0 +else +printf "no\n" +return 1 +fi +} # Beginning of actual script @@ -291,6 +306,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" && tryccprint LIBCC libpcc.a && printf "using compiler runtime libraries: %s\n" "$LIBCC" diff --git a/lib/empty b/lib/empty deleted file mode 100644 index e69de29..0000000