History

allow to compile tcc by pcc

* pcc have only __linux__ macro (and no __linux) * pcc don't have __clear_cache proc

seyko committed 10 years ago

Commit 5ee097f1 parent c6dc7563 files · +6 −2Browse files

Unified · Split

3 files
  1. i386-gen.c +1 −1
  2. libtcc.c +1 −1
  3. tccrun.c +4 −0
i386-gen.c+1−1
@@ -1061,7 +1061,7 @@ ST_FUNC void gen_bounded_ptr_add(void) · 1060 unmodified lines
1061ST_FUNC void gen_bounded_ptr_deref(void)1061ST_FUNC void gen_bounded_ptr_deref(void)
1062{1062{
1063 addr_t func;1063 addr_t func;
1064 addr_t size, align;1064 int size, align;
1065 Elf32_Rel *rel;1065 Elf32_Rel *rel;
1066 Sym *sym;1066 Sym *sym;
1067 1067
libtcc.c+1−1
@@ -1125,7 +1125,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 1124 unmodified lines
1125 tcc_define_symbol(s, "__unix__", NULL);1125 tcc_define_symbol(s, "__unix__", NULL);
1126 tcc_define_symbol(s, "__unix", NULL);1126 tcc_define_symbol(s, "__unix", NULL);
1127 tcc_define_symbol(s, "unix", NULL);1127 tcc_define_symbol(s, "unix", NULL);
1128# if defined(__linux)1128# if defined(__linux__)
1129 tcc_define_symbol(s, "__linux__", NULL);1129 tcc_define_symbol(s, "__linux__", NULL);
1130 tcc_define_symbol(s, "__linux", NULL);1130 tcc_define_symbol(s, "__linux", NULL);
1131# endif1131# endif
tccrun.c+4−0
@@ -235,7 +235,11 @@ static void set_pages_executable(void *ptr, unsigned long length) · 234 unmodified lines
235 end = (addr_t)ptr + length;235 end = (addr_t)ptr + length;
236 end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);236 end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
237 mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);237 mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
238 #ifndef __PCC__
238 __clear_cache(ptr, (char *)ptr + length);239 __clear_cache(ptr, (char *)ptr + length);
240 #else
241 /* pcc 1.2.0.DEVEL 20141206 don't have such proc */
242 #endif
239#endif243#endif
240}244}
241 245

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t