1dnl SPDX-License-Identifier: GPL-2.0-or-later 2dnl Copyright (c) Linux Test Project, 2016 3 4AC_DEFUN([LTP_CHECK_BUILTIN_CLEAR_CACHE],[ 5 AC_MSG_CHECKING([for __builtin___clear_cache]) 6 AC_LINK_IFELSE([AC_LANG_SOURCE([[ 7int main(void) { 8 char arr[16]; 9 __builtin___clear_cache(arr, arr + sizeof(arr)); 10 return 0; 11}]])],[has_bcc="yes"]) 12 13if test "x$has_bcc" = xyes; then 14 AC_DEFINE(HAVE_BUILTIN_CLEAR_CACHE,1,[Define to 1 if you have __builtin___clear_cache]) 15 AC_MSG_RESULT(yes) 16else 17 AC_MSG_RESULT(no) 18fi 19]) 20