1dnl 2dnl Copyright (c) Linux Test Project, 2016 3dnl 4dnl This program is free software; you can redistribute it and/or modify 5dnl it under the terms of the GNU General Public License as published by 6dnl the Free Software Foundation; either version 2 of the License, or 7dnl (at your option) any later version. 8dnl 9dnl This program is distributed in the hope that it will be useful, 10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 12dnl the GNU General Public License for more details. 13dnl 14 15AC_DEFUN([LTP_CHECK_BUILTIN_CLEAR_CACHE],[dnl 16 AC_MSG_CHECKING([for __builtin___clear_cache]) 17 AC_LINK_IFELSE([AC_LANG_SOURCE([[ 18int main(void) { 19 char arr[16]; 20 __builtin___clear_cache(arr, arr + sizeof(arr)); 21 return 0; 22}]])],[has_bcc="yes"]) 23 24if test "x$has_bcc" = xyes; then 25 AC_DEFINE(HAVE_BUILTIN_CLEAR_CACHE,1,[Define to 1 if you have __builtin___clear_cache]) 26 AC_MSG_RESULT(yes) 27else 28 AC_MSG_RESULT(no) 29fi 30]) 31