Skip to content

Commit bdf9215

Browse files
wzssyqatru
authored andcommitted
MIPS: clear_cache, use _flush_cache instead of cacheflush
The cacheflush is only defined with __USE_MISC, which depends on _DEFAULT_SOURCE, _GNU_SOURCE or _BSD_SOURCE, or _SVID_SOURCE. If CC is called with -std=c11, these macros won't be defined, Let's use _flush_cache, which is defined always. Reviewed By: brad, jrtc27 Differential Revision: https://reviews.llvm.org/D156072 (cherry picked from commit 0f99bc2)
1 parent 9a53f9c commit bdf9215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/builtins/clear_cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void __clear_cache(void *start, void *end) {
113113
#elif defined(__linux__) || defined(__OpenBSD__)
114114
// Pre-R6 may not be globalized. And some implementations may give strange
115115
// synci_step. So, let's use libc call for it.
116-
cacheflush(start, end_int - start_int, BCACHE);
116+
_flush_cache(start, end_int - start_int, BCACHE);
117117
#else
118118
(void)start_int;
119119
(void)end_int;

0 commit comments

Comments
 (0)