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
10611061 ST_FUNC void gen_bounded_ptr_deref(void)
10621062 {
10631063 addr_t func;
1064− addr_t size, align;
1064+ int size, align;
10651065 Elf32_Rel *rel;
10661066 Sym *sym;
10671067
libtcc.c+1−1
@@ -1125,7 +1125,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 1124 unmodified lines
11251125 tcc_define_symbol(s, "__unix__", NULL);
11261126 tcc_define_symbol(s, "__unix", NULL);
11271127 tcc_define_symbol(s, "unix", NULL);
1128−# if defined(__linux)
1128+# if defined(__linux__)
11291129 tcc_define_symbol(s, "__linux__", NULL);
11301130 tcc_define_symbol(s, "__linux", NULL);
11311131 # endif
tccrun.c+4−0
@@ -235,7 +235,11 @@ static void set_pages_executable(void *ptr, unsigned long length) · 234 unmodified lines
235235 end = (addr_t)ptr + length;
236236 end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1);
237237 mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC);
238+ #ifndef __PCC__
238239 __clear_cache(ptr, (char *)ptr + length);
240+ #else
241+ /* pcc 1.2.0.DEVEL 20141206 don't have such proc */
242+ #endif
239243 #endif
240244 }
241245

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