X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=aclocal.m4;h=e09bda84406de0fc7d9f5d6389e495b330e7a887;hp=23e6bc08bfe99523b6d0ff00ea09e52a065e7d1e;hb=a52ff7619e8b7d74a9d933d922eeea49f580bca8;hpb=5463b55b7dadc1e9918edb2d8666bf3ed195bc61 diff --git a/aclocal.m4 b/aclocal.m4 index 23e6bc0..e09bda8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -484,6 +484,31 @@ AC_SUBST([LdXFlag]) ])# FP_PROG_LD_X +# FP_PROG_LD_BUILD_ID +# ------------ + +# Sets the output variable LdHasBuildId to YES if ld supports +# --build-id, or NO otherwise. +AC_DEFUN([FP_PROG_LD_BUILD_ID], +[ +AC_CACHE_CHECK([whether ld understands --build-id], [fp_cv_ld_build_id], +[echo 'foo() {}' > conftest.c +${CC-cc} -c conftest.c +if ${LdCmd} -r --build-id=none -o conftest2.o conftest.o > /dev/null 2>&1; then + fp_cv_ld_build_id=yes +else + fp_cv_ld_build_id=no +fi +rm -rf conftest*]) +if test "$fp_cv_ld_build_id" = yes; then + LdHasBuildId=YES +else + LdHasBuildId=NO +fi +AC_SUBST([LdHasBuildId]) +])# FP_PROG_LD_BUILD_ID + + # FP_PROG_LD_IS_GNU # ----------------- # Sets the output variable LdIsGNULd to YES or NO, depending on whether it is