X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=m4%2Fcc.m4;h=425e799172f336566467b0a3f05e739a9ced06bf;hb=f6d5c2083b97d865f0dc9c4e7b98c667f940dc37;hp=b1c001fa389756df58e6855be0d623027f125050;hpb=447a682441a04d2ec95f9f5d1be456d43c88a6ef;p=cln.git diff --git a/m4/cc.m4 b/m4/cc.m4 index b1c001f..425e799 100644 --- a/m4/cc.m4 +++ b/m4/cc.m4 @@ -3,14 +3,15 @@ dnl to the C-compiler when acting on .s files. Appends that option to ASFLAGS. dnl This macro is adapted from one found in GLIBC-2.3.5. AC_DEFUN([CL_AS_NOEXECSTACK],[ AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AM_PROG_AS]) AC_CACHE_CHECK([whether --noexecstack is desirable for .s files], cl_cv_as_noexecstack, [dnl cat > conftest.c </dev/null]) \ && grep -q .note.GNU-stack conftest.s \ - && AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack + && AC_TRY_COMMAND([${CCAS} $CFLAGS $CPPFLAGS -Wa,--noexecstack -c -o conftest.o conftest.s >/dev/null]) then cl_cv_as_noexecstack=yes @@ -19,9 +20,8 @@ EOF fi rm -f conftest*]) if test "$cl_cv_as_noexecstack" = yes; then - ASMFLAGS="$ASMFLAGS -Wa,--noexecstack" + CCASFLAGS="$CCASFLAGS -Wa,--noexecstack" fi - AC_SUBST(ASMFLAGS) ]) @@ -45,6 +45,6 @@ fi rm -f conftest* ]) if test $cl_cv_have_attr_flatten = yes; then - AC_DEFINE(CL_HAVE_ATTRIBUTE_FLATTEN) + AC_DEFINE(CL_HAVE_ATTRIBUTE_FLATTEN, ,[Define if compiler supports __attribute__((flatten))]) fi ])