aboutsummaryrefslogtreecommitdiff
path: root/tccrun.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-04-15 17:41:49 +0300
committerseyko <seyko2@gmail.com>2016-04-15 17:41:49 +0300
commit5ee097fce9dee7eb4dc782c5d6bce75c01243d63 (patch)
tree1da81b958161ecd9b771085831175cf40505bd95 /tccrun.c
parentc6dc756d4e6905df8498596f5bd0c5a6aa1c6d24 (diff)
downloadtinycc-5ee097fce9dee7eb4dc782c5d6bce75c01243d63.tar.gz
tinycc-5ee097fce9dee7eb4dc782c5d6bce75c01243d63.tar.bz2
allow to compile tcc by pcc
* pcc have only __linux__ macro (and no __linux) * pcc don't have __clear_cache proc
Diffstat (limited to 'tccrun.c')
-rw-r--r--tccrun.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tccrun.c b/tccrun.c
index 2519105..9ee70e4 100644
--- a/tccrun.c
+++ b/tccrun.c
@@ -235,7 +235,11 @@ static void set_pages_executable(void *ptr, unsigned long length)
end = (addr_t)ptr + length;
end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
+ #ifndef __PCC__
__clear_cache(ptr, (char *)ptr + length);
+ #else
+ /* pcc 1.2.0.DEVEL 20141206 don't have such proc */
+ #endif
#endif
}