History

update

bellard committed 23 years ago

Commit 4e6edcd1 parent 98713a63 files · +61 −18Browse files

Unified · Split

3 files
  1. Changelog +1 −0
  2. TODO +10 −9
  3. tcc-doc.texi +50 −9
Changelog+1−0
@@ -13,6 +13,7 @@ version 0.9.19: · 12 unmodified lines
1313 - fixed macro argument substitution
1414 - fixed zero argument macro parsing
1515 - changed license to LGPL
16+- added -rdynamic option support
1617
1718 version 0.9.18:
1819
TODO+10−9
@@ -1,5 +1,13 @@
11 TODO list:
22
3+- long long constant evaluation
4+- configure --cc=tcc (still one bug in libtcc1.c)
5+- disable-asm and disable-bcheck options
6+- test binutils/gcc compile
7+- add alloca(), __builtin_expect()
8+- gcc '-E' option.
9+- optimize VT_LOCAL + const
10+- tci patch + argument.
311 - '-b' bug.
412 - atexit (Nigel Horne)
513 - see -lxxx bug (Michael Charity).
@@ -8,31 +16,24 @@ TODO list: · 2 unmodified lines
816 - precise behaviour of typeof with arrays ? (__put_user macro)
917 - #include_next support for /usr/include/limits ?
1018 but should suffice for most cases)
11−- handle '? x, y : z' in reversed function arguments or unsized
12− variable initialization (',' is considered incorrectly as separator
13− in preparser) : change func argument code generator ?
19+- handle '? x, y : z' in unsized variable initialization (',' is
20+ considered incorrectly as separator in preparser)
1421 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
1522 - transform functions to function pointers in function parameters (net/ipv4/ip_output.c)
1623 - fix function pointer type display
1724 - fix bound exit on RedHat 7.3
18−- fix static link on RedHat 7.3
1925 - check lcc test suite -> fix bitfield binary operations
2026 - check section alignment in C
2127 - fix invalid cast in comparison 'if (v == (int8_t)v)'
2228 - packed attribute
23−- look at patches from Scott Lafferty
24−- look at bugs from Jason Petrasko.
2529 - support link once trick (gcc 3.2 / glibc compilation issue)
2630 - finish varargs.h support (gcc 3.2 testsuite issue)
27−- add alloca()
2831 - fix static functions declared inside block
2932 - C99: add variable size arrays (gcc 3.2 testsuite issue)
3033 - C99: add complex types (gcc 3.2 testsuite issue)
3134 - postfix compound literals (see 20010124-1.c)
3235 - fix multiple unions init
33−- test includes in libtcc_test.
3436 - look at GCC 3.2 compatibility problems.
35−- add option for auto run
3637 - setjmp is not supported properly in bound checking.
3738 - better local variables handling (needed for other targets)
3839 - fix bound check code with '&' on local variables (currently done
tcc-doc.texi+50−9
@@ -67,9 +67,7 @@ generation (@pxref{Libtcc}). · 66 unmodified lines
6767
6868 @example
6969 @c man begin SYNOPSIS
70−usage: tcc [@option{-v}] [@option{-c}] [@option{-o}@var{outfile}] [@option{-B}@var{dir}] [@option{-bench}] [@option{-I}@var{dir}] [@option{-D}@var{sym[=val]}] [@option{-U}@var{sym}]
71− [@option{-g}] [@option{-b}] [@option{-bt}@var{N}] [@option{-L}@var{dir}] [@option{-l}@var{lib}] [@option{-shared}] [@option{-static}]
72− [@var{infile1} @var{infile2}@dots{}] [@option{run} @var{infile} @var{args}@dots{}]
70+usage: tcc [options] [@var{infile1} @var{infile2}@dots{}] [@option{-run} @var{infile} @var{args}@dots{}]
7371 @c man end
7472 @end example
7573
@@ -181,6 +179,27 @@ also be defined: @option{-DF(a)=a+1} · 105 unmodified lines
181179 Undefine preprocessor symbol @samp{sym}.
182180 @end table
183181
182+Warning options:
183+
184+Note: each warning option has a negative form beginning with @option{-Wno-}.
185+
186+@table @option
187+@item -Wunsupported
188+Warn about unsupported GCC features that are ignored by TCC.
189+
190+@item -Wwrite-strings
191+Make string constants being of type @code{const char *} intead of @code{char
192+*}.
193+
194+@item -Werror
195+Abort compilation if warnings are issued.
196+
197+@item -Wall
198+Activate all warnings, except @option{-Werror}, @option{-Wunusupported} and
199+@option{-Wwrite-strings} (currently not useful).
200+
201+@end table
202+
184203 Linker options:
185204
186205 @table @option
@@ -201,6 +220,10 @@ must also be given). · 14 unmodified lines
201220 Generate a statically linked executable (default is a shared linked
202221 executable) (@option{-o} option must also be given).
203222
223+@item -rdynamic
224+Export global symbols to the dynamic linker. It is useful when a library
225+opened with @code{dlopen()} needs to access executable symbols.
226+
204227 @item -r
205228 Generate an object file combining all input files (@option{-o} option must
206229 also be given).
@@ -227,7 +250,7 @@ Display N callers in stack traces. This is useful with @option{-g} or · 20 unmodified lines
227250
228251 @end table
229252
230−Note: GCC options @option{-Ox}, @option{-Wx}, @option{-fx} and @option{-mx} are
253+Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are
231254 ignored.
232255 @c man end
233256
@@ -434,6 +457,9 @@ TCC includes its own x86 inline assembler with a @code{gas}-like (GNU · 200 unmodified lines
434457 assembler) syntax. No intermediate files are generated. GCC 3.x named
435458 operands are supported.
436459
460+@item @code{__builtin_types_compatible_p()} and @code{__builtin_constant_p()}
461+are supported.
462+
437463 @end itemize
438464
439465 @section TinyCC extensions
@@ -531,6 +557,12 @@ They can be defined several times in the same source. Use 'b' · 91 unmodified lines
531557 @cindex .short
532558 @cindex .int
533559 @cindex .long
560+@cindex .string
561+@cindex .globl
562+@cindex .section
563+@cindex .text
564+@cindex .data
565+@cindex .bss
534566
535567 All directives are preceeded by a '.'. The following directives are
536568 supported:
@@ -544,6 +576,12 @@ supported: · 7 unmodified lines
544576 @item .short value1[,value2...]
545577 @item .int value1[,value2...]
546578 @item .long value1[,value2...]
579+@item .string string
580+@item .global symbol
581+@item .section section
582+@item .text
583+@item .data
584+@item .bss
547585 @end itemize
548586
549587 @section X86 Assembler
@@ -569,10 +607,10 @@ Dynamic ELF libraries can be output but the C compiler does not generate · 19 unmodified lines
569607 position independent code (PIC). It means that the dynamic librairy
570608 code generated by TCC cannot be factorized among processes yet.
571609
572−TCC linker cannot currently eliminate unused object code. But TCC
573−will soon integrate a novel feature not found in GNU tools: unused code
574−will be eliminated at the function or variable level, provided you only
575−use TCC to compile your files.
610+TCC linker eliminates unreferenced object code in libraries. A single pass is
611+done on the object and library list, so the order in which object files and
612+libraries are specified is important (same constraint as GNU ld). No grouping
613+options (@option{--start-group} and @option{--end-group}) are supported.
576614
577615 @section ELF file loader
578616
@@ -584,12 +622,15 @@ libraries (.so). · 5 unmodified lines
584622 @cindex linker scripts
585623 @cindex GROUP, linker command
586624 @cindex FILE, linker command
625+@cindex OUTPUT_FORMAT, linker command
626+@cindex TARGET, linker command
587627
588628 Because on many Linux systems some dynamic libraries (such as
589629 @file{/usr/lib/libc.so}) are in fact GNU ld link scripts (horrible!),
590630 the TCC linker also supports a subset of GNU ld scripts.
591631
592−The @code{GROUP} and @code{FILE} commands are supported.
632+The @code{GROUP} and @code{FILE} commands are supported. @code{OUTPUT_FORMAT}
633+and @code{TARGET} are ignored.
593634
594635 Example from @file{/usr/lib/libc.so}:
595636 @example