[PATCH v2 1/4] aarch64: add configure checks for BTI support
Andreas Schwab
schwab@suse.de
Wed Nov 19 16:46:10 GMT 2025
On Nov 19 2025, Yury Khrustalev wrote:
> diff --git a/aclocal.m4 b/aclocal.m4
> index cfe9c0b538..31f13a2f46 100644
> --- a/aclocal.m4
> +++ b/aclocal.m4
> @@ -497,3 +497,17 @@ LIBC_CHECK_TEST_CXX(
> [LIBC_TRY_CXX_OPTION([$2], [$4], [$5])])
> )
> ])
> +
> +dnl Check if a CC compiler defines a macro.
> +dnl LIBC_CHECK_CC_MACRO([message], [macro],
> +dnl [CC-cache-id], [CC-action-if-true], [CC-action-if-false])
> +AC_DEFUN([LIBC_CHECK_CC_MACRO],
> +[
> +AC_CACHE_CHECK([$1], $3, [dnl
> + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -dM -E - < /dev/null | grep -wF "$2" 1>&AS_MESSAGE_LOG_FD])
> + then
> + [$4]
> + else
> + [$5]
> + fi])
> +])
This should use AC_EGREP_CPP, and I don't think we need an extra macro
for that.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list