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