X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure;h=2d7ea30ea17ab48c53b8dd651adcb22a5a4f41c1;hb=c243d6f09570010a448789dd296b14b7a61cb2ea;hp=5b97f719b0da622b81cdaf94ae0a2dbeabea332e;hpb=ce3e24eaae91e7a90f87eb7f1edea8df5942de11;p=musl diff --git a/configure b/configure index 5b97f719..2d7ea30e 100755 --- a/configure +++ b/configure @@ -532,6 +532,15 @@ CFLAGS_AUTO="$CFLAGS_AUTO -include vis.h" CFLAGS_AUTO="${CFLAGS_AUTO# }" fi +# Determine if the compiler produces position-independent code (PIC) +# by default. If so, we don't need to compile separate object files +# for libc.a and libc.so. +if trycppif __PIC__ "$CFLAGS_C99FSE $CPPFLAGS $CFLAGS" ; then +pic_default=yes +else +pic_default=no +fi + # Reduce space lost to padding for alignment purposes by sorting data # objects according to their alignment reqirements. This approximates # optimal packing. @@ -692,6 +701,7 @@ test "x$static" = xno && echo "STATIC_LIBS =" test "x$shared" = xno && echo "SHARED_LIBS =" test "x$cc_family" = xgcc && echo 'WRAPCC_GCC = $(CC)' test "x$cc_family" = xclang && echo 'WRAPCC_CLANG = $(CC)' +test "x$pic_default" = xyes && echo 'AOBJS = $(LOBJS)' exec 1>&3 3>&- test "$srcdir" = "." || ln -sf $srcdir/Makefile .