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