Unified · Split
| @@ -12,7 +12,7 @@ CFLAGS+=-m386 -malign-functions=0 · 11 unmodified lines | ||
| 12 | 12 | CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\" |
| 13 | 13 | DISAS=objdump -d |
| 14 | 14 | INSTALL=install |
| 15 | −VERSION=0.9.10 | |
| 15 | +VERSION=0.9.11 | |
| 16 | 16 | |
| 17 | 17 | # run local version of tcc with local libraries and includes |
| 18 | 18 | TCC=./tcc -B. -I. |
| @@ -117,7 +117,7 @@ bcheck.o: bcheck.c · 98 unmodified lines | ||
| 117 | 117 | |
| 118 | 118 | install: tcc libtcc1.o bcheck.o |
| 119 | 119 | $(INSTALL) -m755 tcc $(prefix)/bin |
| 120 | − $(INSTALL) tcc.1 $(prefix)/share/man/man1 | |
| 120 | + $(INSTALL) tcc.1 $(prefix)/man/man1 | |
| 121 | 121 | mkdir -p $(prefix)/lib/tcc |
| 122 | 122 | mkdir -p $(prefix)/lib/tcc/include |
| 123 | 123 | $(INSTALL) -m644 libtcc1.o bcheck.o $(prefix)/lib/tcc |
| @@ -179,21 +179,24 @@ instr.o: instr.S · 55 unmodified lines | ||
| 179 | 179 | tcc-doc.html: tcc-doc.texi |
| 180 | 180 | texi2html -monolithic -number $< |
| 181 | 181 | |
| 182 | +FILES= Makefile Makefile.uClibc \ | |
| 183 | + README TODO COPYING \ | |
| 184 | + Changelog tcc-doc.texi tcc-doc.html \ | |
| 185 | + tcc.1 \ | |
| 186 | + tcc.c i386-gen.c tccelf.c tcctok.h \ | |
| 187 | + bcheck.c libtcc1.c \ | |
| 188 | + il-opcodes.h il-gen.c \ | |
| 189 | + elf.h stab.h stab.def \ | |
| 190 | + stddef.h stdarg.h stdbool.h float.h \ | |
| 191 | + tcclib.h libtcc.h libtcc_test.c \ | |
| 192 | + ex1.c ex2.c ex3.c ex4.c ex5.c \ | |
| 193 | + tcctest.c boundtest.c | |
| 194 | + | |
| 182 | 195 | FILE=tcc-$(VERSION) |
| 183 | 196 | |
| 184 | 197 | tar: |
| 185 | 198 | rm -rf /tmp/$(FILE) |
| 186 | − cp -r ../tcc /tmp/$(FILE) | |
| 187 | − ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz \ | |
| 188 | − $(FILE)/Makefile $(FILE)/Makefile.uClibc \ | |
| 189 | − $(FILE)/README $(FILE)/TODO $(FILE)/COPYING \ | |
| 190 | − $(FILE)/Changelog $(FILE)/tcc-doc.texi $(FILE)/tcc-doc.html \ | |
| 191 | − $(FILE)/tcc.1 \ | |
| 192 | − $(FILE)/tcc.c $(FILE)/i386-gen.c $(FILE)/tccelf.c $(FILE)/tcctok.h \ | |
| 193 | − $(FILE)/bcheck.c $(FILE)/libtcc1.c \ | |
| 194 | − $(FILE)/il-opcodes.h $(FILE)/il-gen.c \ | |
| 195 | − $(FILE)/elf.h $(FILE)/stab.h $(FILE)/stab.def \ | |
| 196 | − $(FILE)/stddef.h $(FILE)/stdarg.h $(FILE)/stdbool.h $(FILE)/float.h \ | |
| 197 | − $(FILE)/tcclib.h $(FILE)/libtcc.h $(FILE)/libtcc_test.c \ | |
| 198 | − $(FILE)/ex*.c $(FILE)/tcctest.c $(FILE)/boundtest.c ) | |
| 199 | + mkdir -p /tmp/$(FILE) | |
| 200 | + cp -P $(FILES) /tmp/$(FILE) | |
| 201 | + ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) ) | |
| 199 | 202 | rm -rf /tmp/$(FILE) |
| @@ -1,15 +1,18 @@ | ||
| 1 | 1 | TODO list: |
| 2 | 2 | |
| 3 | −- add separate symbol/offset handling (= fix some constant | |
| 4 | − initialisation bugs) | |
| 5 | −- setjmp is not supported properly in bound checking. | |
| 3 | +- fix constant error msg | |
| 4 | +- add alloca() | |
| 5 | +- add typeof() | |
| 6 | +- add checks for multiple including of same file (= compile even faster) | |
| 6 | 7 | - add 'CType' structure to optimize type handling (= compile even faster) |
| 7 | 8 | - suppress unneeded hash table for Symbols (= compile even faster) |
| 8 | −- add checks for multiple including of same file (= compile even faster) | |
| 9 | +- ignore at least asm extension | |
| 10 | +- setjmp is not supported properly in bound checking. | |
| 9 | 11 | - better local variables handling (needed for other targets) |
| 10 | 12 | - fix bound check code with '&' on local variables (currently done |
| 11 | 13 | only for local arrays). |
| 12 | −- To check: bound checking and float/long long/struct copy code | |
| 14 | +- To check: bound checking and float/long long/struct copy code. bound | |
| 15 | + checking and symbol + offset optimization | |
| 13 | 16 | - To fix: 'sizeof' generate code if too complex expression is given. |
| 14 | 17 | - free all allocated data and use longjmp for errors (useful for libtcc use) |
| 15 | 18 | |
| @@ -67,9 +67,12 @@ Compile a.c and b.c, link them and generate the executable myprog. · 66 unmodified lines | ||
| 67 | 67 | @item tcc -o myprog a.o b.o |
| 68 | 68 | link a.o and b.o together and generate the executable myprog. |
| 69 | 69 | |
| 70 | −@item tcc -c -o a.o a.c | |
| 70 | +@item tcc -c a.c | |
| 71 | 71 | Compile a.c and generate object file a.o |
| 72 | 72 | |
| 73 | +@item tcc -r -o ab.o a.c b.c | |
| 74 | +Compile a.c and b.c, link them together and generate the object file ab.o. | |
| 75 | + | |
| 73 | 76 | @end table |
| 74 | 77 | |
| 75 | 78 | Scripting: |
| @@ -163,6 +166,10 @@ must also be given). · 87 unmodified lines | ||
| 163 | 166 | Generate a statically linked executable (default is a shared linked |
| 164 | 167 | executable) (@samp{-o} option must also be given). |
| 165 | 168 | |
| 169 | +@item -r | |
| 170 | +Generate an object file combining all input files (@samp{-o} option must | |
| 171 | +also be given). | |
| 172 | + | |
| 166 | 173 | @end table |
| 167 | 174 | |
| 168 | 175 | @chapter C language support |
| @@ -309,6 +316,10 @@ generate function @code{'my_add'} in section @code{.mycodesection}. · 140 unmodified lines | ||
| 309 | 316 | dprintf("one arg %d\n", 1); |
| 310 | 317 | @end example |
| 311 | 318 | |
| 319 | +@item @code{__FUNCTION__} is interpreted as C99 @code{__func__} | |
| 320 | +(so it has not exactly the same semantics as string literal GNUC | |
| 321 | +where it is a string literal). | |
| 322 | + | |
| 312 | 323 | @end itemize |
| 313 | 324 | |
| 314 | 325 | @section TinyCC extensions |