win32: readme.txt->tcc-win32.txt, update tcc-doc

This commit is contained in:
grischka 2009-04-18 14:20:27 +02:00
parent eca1fbaf92
commit e8a52a8249
5 changed files with 177 additions and 136 deletions

View File

@ -268,7 +268,7 @@ endif
mkdir -p "$(DESTDIR)$(docdir)"
$(INSTALL) -m644 tcc-doc.html "$(DESTDIR)$(docdir)"
ifdef CONFIG_WIN32
$(INSTALL) -m644 win32/readme.txt "$(DESTDIR)$(docdir)"
$(INSTALL) -m644 win32/tcc-win32.txt "$(DESTDIR)$(docdir)"
endif
clean:

5
README
View File

@ -28,7 +28,7 @@ Features:
Documentation:
-------------
1) Installation on a i386 Linux host (for Windows read win32/readme.txt)
1) Installation on a i386 Linux host (for Windows read tcc-win32.txt)
./configure
make
@ -79,8 +79,7 @@ when doing 'make test'.
Please read tcc-doc.html to have all the features of TCC.
Additional information is available for the Windows port in
win32/readme.txt.
Additional information is available for the Windows port in tcc-win32.txt.
License:
-------

View File

@ -16,11 +16,8 @@
@headings double
@end iftex
@c @ifhtml
@contents
@c @end ifhtml
@ifnothtml
@node Top, Introduction, (dir), (dir)
@top Tiny C Compiler Reference Documentation
@ -29,10 +26,14 @@ This manual documents version @value{VERSION} of the Tiny C Compiler.
@menu
* Introduction:: Introduction to tcc.
* Invoke:: Invocation of tcc (command line, options).
* Clang:: ANSI C and extensions.
* asm:: Assembler syntax.
* linker:: Output file generation and supported targets.
* Bounds:: Automatic bounds-checking of C code.
* Libtcc:: The libtcc library.
* devel:: Guide for Developers.
@end menu
@end ifnothtml
@node Introduction
@chapter Introduction
@ -63,11 +64,11 @@ ports for the ARM (@code{arm-tcc}) and the TMS320C67xx targets
(@code{c67-tcc}). More information about the ARM port is available at
@url{http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html}.
For usage on Windows, see also tcc-win32.txt.
@node Invoke
@chapter Command line invocation
[This manual documents version @value{VERSION} of the Tiny C Compiler]
@section Quick start
@example
@ -142,7 +143,7 @@ TCC can read C source code from @emph{standard input} when @option{-} is used in
place of @option{infile}. Example:
@example
echo 'main(){puts("hello");}' | tcc -run -
echo 'main()@{puts("hello");@}' | tcc -run -
@end example
@c man end
@ -346,6 +347,7 @@ Fabrice Bellard
@end ignore
@node Clang
@chapter C language support
@section ANSI C
@ -577,6 +579,7 @@ indicate that you use TCC.
@end itemize
@node asm
@chapter TinyCC Assembler
Since version 0.9.16, TinyCC integrates its own assembler. TinyCC
@ -706,6 +709,7 @@ tries to guess it from the operand sizes.
Currently, MMX opcodes are supported but not SSE ones.
@node linker
@chapter TinyCC Linker
@cindex linker
@ -734,16 +738,9 @@ libraries (.so).
@cindex PE-i386
TCC for Windows supports the native Win32 executable file format (PE-i386). It
generates both EXE and DLL files. DLL symbols can be imported thru DEF files
generated with the @code{tiny_impdef} tool.
generates EXE files (console and gui) and DLL files.
On the object file level, currently TCC supports only the ELF format, not COFF
as used by MINGW and MSVC. It is not possible to exchange object files or
libraries between TCC and these compilers. However libraries for TCC from objects
by TCC can be made using the @code{tiny_libmaker} tool or MINGW's @code{ar}.
No leading underscore is generated in the ELF symbols. Only functions (no
data) can be exported. Bounds checking (@option{-b}) is not supported currently.
For usage on Windows, see also tcc-win32.txt.
@section GNU Linker Scripts
@cindex scripts, linker
@ -854,6 +851,7 @@ The idea consists in giving a C string containing the program you want
to compile directly to @code{libtcc}. Then you can access to any global
symbol (function or variable) defined.
@node devel
@chapter Developer's guide
This chapter gives some hints to understand how TCC works. You can skip

View File

@ -1,114 +0,0 @@
TinyCC
======
This file contains some additional information for usage of TinyCC
under MS-Windows:
Overview:
---------
TinyCC (aka TCC) is a small but hyperfast C compiler, written by
Fabrice Bellard.
TinyCC for MS-Windows can produce console applications, native
windows GUI programs and DLL's.
The package with under 300kb includes a complete C-compiler with
header files and basic system library support.
With the -run switch you can run C-sources without any linking
directly from the command line.
TinyCC can be used as dynamic code generator library in your own
program.
TinyCC can of course compile itself.
Compilation: (omit that if you use the binary ZIP package)
------------
You can use the MinGW and MSYS tools available at
http://www.mingw.org to compile TCC for Windows. Untar the TCC
archive and type in the MSYS shell:
./configure
make
make install
TCC is installed in c:\Program Files\tcc
Alternatively you can use win32\build-tcc.bat to compile TCC
with just gcc and ar from MINGW. To install, copy the entire
contents of the win32 directory to where you want.
Installation: (from the binary ZIP package)
-------------
Just unzip the package to a directory anywhere on your computer.
The binary package does not include libtcc. If you want tcc as
dynamic code generator, please use the source code distribution.
Examples:
---------
For the 'Fibonacci' console example type from the command line:
tcc examples\fib.c
For the 'Hello Windows' GUI example:
tcc examples\hello_win.c
For the 'Hello DLL' example:
tcc -shared examples\dll.c
tcc examples\hello_dll.c examples\dll.def
Import Definition Files:
------------------------
To link with Windows system DLLs, TinyCC uses import definition
files (.def) instead of libraries.
The included 'tiny_impdef' program may be used to make additional
.def files for any DLL. For example:
tiny_impdef.exe opengl32.dll
To use it, put the opengl32.def file into the tcc/lib directory,
and specify -lopengl32 at the tcc commandline.
Resource Files:
---------------
TinyCC-PE can now link windows resources in coff format as generated
by MINGW's windres.exe. For example:
windres -O coff app.rc -o appres.o
tcc app.c appres.o -o app.exe
Tiny Libmaker:
--------------
The included tiny_libmaker tool by Timovj Lahde can be used as
'ar' replacement to make a library from several object files.
Header Files:
-------------
The system header files (except _mingw.h) are from the mingw
distribution (http://www.mingw.org/).
Documentation and License:
--------------------------
TCC is distributed under the GNU Lesser General Public License
(see COPYING file).
Please read tcc-doc.html to have all the features of TCC. Also
visit: http://fabrice.bellard.free.fr/tcc/
-- grischka@users.sourceforge.net

158
win32/tcc-win32.txt Normal file
View File

@ -0,0 +1,158 @@
TinyCC
======
This file contains specific information for usage of TinyCC
under MS-Windows. See tcc-doc.html to have all the features.
Compilation from source:
------------------------
* You can use the MinGW and MSYS tools available at
http://www.mingw.org
Untar the TCC archive and type in the MSYS shell:
./configure
make
make install
The default install location is c:\Program Files\tcc
* Alternatively you can compile TCC with just GCC from MinGW using
win32\build-tcc.bat
To install, copy the entire contents of the win32 directory to
where you want.
Installation from the binary ZIP package:
-----------------------------------------
Unzip the package to a directory of your choice.
(Note that the binary package does not include libtcc. If you
want TCC as dynamic code generator, please use the source code
distribution.)
Set the system PATH:
--------------------
To be able to invoke the compiler from everywhere on your computer by
just typing "tcc", please add the directory containing tcc.exe to your
system PATH.
Examples:
---------
Open a console window (DOS box) and 'cd' to the examples directory.
For the 'Fibonacci' example type:
tcc fib.c
For the 'Hello Windows' GUI example type:
tcc hello_win.c
for the 'Hello DLL' example type
tcc -shared dll.c
tiny_impdef dll.dll (optional)
tcc hello_dll.c dll.def
Import Definition Files:
------------------------
To link with Windows system DLLs, TCC uses import definition
files (.def) instead of libraries.
The included 'tiny_impdef' program may be used to make additional
.def files for any DLL. For example:
tiny_impdef.exe opengl32.dll
Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
the TCC commandline to link a program that uses opengl32.dll.
Header Files:
-------------
The system header files (except _mingw.h) are from the MinGW
distribution:
http://www.mingw.org/
From the windows headers, only a minimal set is included. If you need
more, get MinGW's "w32api" package.
Resource Files:
---------------
TCC can link windows resources in coff format as generated by MinGW's
windres.exe. For example:
windres -O coff app.rc -o appres.o
tcc app.c appres.o -o app.exe
Tiny Libmaker:
--------------
The included tiny_libmaker tool by Timovj Lahde can be used as
'ar' replacement to make a library from several object files:
tiny_libmaker [rcs] library objectfiles ...
Limitations:
------------
- On the object file level, currently TCC supports only the ELF format,
not COFF as used by MinGW and MSVC. It is not possible to exchange
object files or libraries between TCC and these compilers. However
libraries for TCC from objects by TCC can be made using tiny_libmaker
or MinGW's ar.
- No leading underscore is generated in the ELF symbols.
- With DLLs, only functions (not data) can be im-/exported.
- Bounds checking (option -b) is not supported currently.
- 64-bit systems are not (yet) supported.
Documentation and License:
--------------------------
TCC is distributed under the GNU Lesser General Public License. (See
COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
TinyCC homepage is at:
http://fabrice.bellard.free.fr/tcc/
WinAPI Help and 3rd-party tools:
--------------------------------
The Windows API documentation (Win95) in a single .hlp file is
available on the lcc-win32 site as "win32hlp.exe" or from other
locations as "win32hlp_big.zip".
A nice RAD tool to create windows resources (dialog boxes etc.) is
"ResEd", available at the RadASM website.
--- grischka