aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
Commit message (Collapse)AuthorAgeFilesLines
* tcc: add -m32 option to x86_64 cross compilersHenry Kroll III2010-12-061-0/+1
|
* libtcc: new function tcc_open_bf to create BufferedFilegrischka2010-11-251-2/+5
| | | | | | | | Use it in: - tcc_open - tcc_compile_string - tcc_define_symbol - tcc_assemble_inline
* x86_64: fix --with-libgcc and simplify biarch pathsHenry Kroll III2010-11-251-0/+3
|
* Move asm label functions from tccasm.c to tccgen.cThomas Preud'homme2010-09-141-2/+1
| | | | | | | | | | * Move functions parse_asm_str and asm_label_instr from tccasm.c to tccgen.c * Remove CONFIG_TCC_ASM_LABEL macro as asm label are available on all archs. See: http://lists.nongnu.org/archive/html/tinycc-devel/2010-09/msg00026.html for the rationale.
* Add support for __FreeBSD_kernel__ kernelThomas Preud'homme2010-09-101-1/+2
| | | | | Add support for kfreebsd-i386 and kfreebsd-amd64 Debian arch with thanks to Pierre Chifflier <chifflier@cpe.fr>.
* Add support for GNU/HurdThomas Preud'homme2010-09-101-0/+4
| | | | | + Add i686-AT386 to the list of x86 platform + Define SA_SIGINFO is not defined
* Add support of asm label for functions.Thomas Preud'homme2010-09-101-0/+3
| | | | | | Add support for asm labels for functions, that is the ability to rename a function at assembly level with __asm__ ("newname") appended in function declaration.
* tcc: Draft suppoprt for -MD/-MF optionsKirill Smelkov2010-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In build systems, this is used to automatically collect target dependencies, e.g. ---- 8< (hello.c) ---- #include "hello.h" #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } $ tcc -MD -c hello.c # -> hello.o, hello.d $ cat hello.d hello.o : \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ NOTE: gcc supports -MD only for .c -> .o, but in tcc, we generate dependencies for whatever action is being taken. E.g. for .c -> exe, the result will be: $ tcc -MD -o hello hello.c # -> hello, hello.d hello: \ /usr/lib/crt1.o \ /usr/lib/crti.o \ hello.c \ hello.h \ /usr/include/stdio.h \ /usr/include/features.h \ /usr/include/bits/predefs.h \ /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs.h \ /usr/include/bits/wordsize.h \ /usr/include/gnu/stubs-32.h \ /home/kirr/local/tcc/lib/tcc/include/stddef.h \ /usr/include/bits/types.h \ /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h \ /usr/include/libio.h \ /usr/include/_G_config.h \ /usr/include/wchar.h \ /home/kirr/local/tcc/lib/tcc/include/stdarg.h \ /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h \ /usr/lib/libc.so \ /lib/libc.so.6 \ /usr/lib/ld-linux.so.2 \ /lib/ld-linux.so.2 \ /usr/lib/libc_nonshared.a \ /lib/libc.so.6 \ /usr/lib/libc_nonshared.a \ /home/kirr/local/tcc/lib/tcc/libtcc1.a \ /usr/lib/crtn.o \ So tcc dependency generator is a bit more clever than one used in gcc :) Also, I've updated TODO and Changelog (in not-yet-released section). v2: (Taking inputs from grischka and me myself) - put code to generate deps file into a function. - used tcc_fileextension() instead of open-coding - generate deps only when compilation/preprocessing was successful v3: - use pstrcpy instead of snprintf(buf, sizeof(buf), "%s", ...)
* Add input files/libs and reloc_output switch to TCCStateKirill Smelkov2010-06-201-1/+8
| | | | | | | | | | | | | | | | | files[0], and reloc_outpu will be needed for (upcoming in the next patch) "compute default outfile name" refactored into libtcc function. Also, since for symmetry and from libification point of view, it makes some sense to also put all information about what was given as input to compilation into TCCState, let's not only put files[0], but all files and all libraries given explicitely by user. One point: I've used bitfield for reloc_output & trimmed down output_type to 8 bits so that TCCState stays the same in size, and also access to output_type is (hopefully) is not slower. By the way -- as of today, sizeof(TCCState) on i686-pc-linux-gnu is 2884 bytes...
* ARM: allow jumps > 32MB on -runDaniel Glöckner2010-05-141-1/+1
| | | | This is needed to reach tinycc's PLT from the compiled program.
* ARM: use uint32_t for opcodesDaniel Glöckner2010-05-131-1/+1
| | | | fixes cross compiling on x86_64
* make --with-selinux work with libtcc, tooHenry Kroll III2010-04-241-0/+4
|
* Clean changes introduced by 47abdbdThomas Preud'homme2010-04-201-2/+0
| | | | | | | | | | | | * Replace the save/load_buffer_state by a dynarray approach: - Filename and libname are added to a dynarray when first encountered - Load repeatedly the files in the dynarray until no new undefined symbol are encountered * Replace snprintf by sprintf in libname_to_filename * Use tcc_fileextension in filename_to_libname * Introduce a tcc_strcpy_part fonction to copy only a subset of a string * Move new_undef_syms declaration from tcc.h to tccelf.c
* libtcc.c: fix compilation failure (inconsistent tcc_add_file_internal)Sergei Trofimovich2010-04-191-0/+1
| | | | | | | | | gcc -o libtcc1.o -c lib/libtcc1.c -O2 -Wall libtcc.c: At top level: libtcc.c:1063: error: static declaration of 'tcc_add_file_internal' follows non-static declaration tccelf.c:2915: note: previous implicit declaration of 'tcc_add_file_internal' was here Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
* Better handle ld scriptsThomas Preud'homme2010-04-151-0/+2
| | | | | | | * search file from INPUT and GROUP commands in the library path in addition to the current directory * handle libraries specified by -lfoo options * Search lib in GROUP command repeatedly
* libtcc: Detect (but ignore) -init and -fini for -WlDetlef Riekenberg2010-04-051-0/+4
| | | | | -- By by ... Detlef
* weak function symbolsManuel Simoni2010-02-271-1/+3
|
* fill got table for static linkingAli Gholami Rudi2010-02-051-0/+1
|
* Added patch to detect and use the paths for 64bit libraries asNikos Mavrogiannopoulos2010-01-281-1/+5
| | | | used by CentOS (affects X86_64 only).
* Add support for the __mode__ attributeDetlef Riekenberg2010-01-261-1/+3
| | | | | -- By by ... Detlef
* Recognize -Wl,-BsymbolicDetlef Riekenberg2010-01-261-0/+3
| | | | | | | | | | | | | | | Without -Bsymbolic, a symbol/function in a *.so can be overridden by a symbol/function in the main module. That is the default search order, but not supported by tcc. With -Bsymbolic, the linker tries to resolve a symbol/function in the current module first. The loader in tcc implements this search order. We do not distinguish -Bsymbolic and -Bsymbolic-function -- By by ... Detlef
* tccpp: convert TOK_GET macro into functiongrischka2010-01-141-3/+3
|
* x86-64: use uplong for symbol valuesgrischka2010-01-141-1/+1
|
* tccpe: improve dllimport/export and use for tcc_add_symbolgrischka2010-01-141-4/+6
|
* build from multiple objects: fix other targetsgrischka2009-12-201-4/+21
|
* use vpushv in some placesgrischka2009-12-201-0/+1
|
* win64: add tiny unwind data for setjmp/longjmpgrischka2009-12-201-0/+7
| | | | | | | | | This enables native unwind semantics with longjmp on win64 by putting an entry into the .pdata section for each compiled fuction. Also, the function now use a fixed stack and store arguments into X(%rsp) rather than using push.
* allow tcc be build from separate objectsgrischka2009-12-201-28/+406
| | | | If you want that, run: make NOTALLINONE=1
* win32: enable bounds checker & exception handlergrischka2009-12-191-7/+4
| | | | exception handler borrowed from k1w1. Thanks.
* tcc_relocate: revert to 0.9.24 behaviorgrischka2009-12-191-0/+1
|
* tccpe: improve dllimportgrischka2009-12-191-1/+2
|
* integrate x86_64-asm.c into i386-asm.cgrischka2009-12-191-9/+15
| | | | | Also, disable 16bit support for now as it causes bugs in 32bit mode. #define I386_ASM_16 if you want it.
* tcc: add "-Wl,-rpath=path" option (library search path)grischka2009-12-191-0/+2
|
* tccgen: propagate alignment from typedefgrischka2009-12-061-26/+15
| | | | | Store (part of) the AttributeDef structure in the (int)sym-r field of the typedef symbol (kludgy).
* various fixes and new options for PE formatFrederic Feret2009-11-131-0/+9
|
* first support of x86_64 assemblyFrederic Feret2009-11-131-2/+18
|
* added 16-bit x86 assembly supportFrederic Feret2009-11-131-0/+4
|
* win32: handle __declspec(dllimport)grischka2009-11-131-2/+5
|
* tccpe: set tcc_lib_path from DLLgrischka2009-07-181-1/+1
|
* tccpe: load dll on the flygrischka2009-07-181-1/+0
|
* win64: align jmp_bufgrischka2009-07-181-0/+10
|
* win64: fix pointer <-> unsigned long typecast issuesgrischka2009-07-181-1/+11
|
* pe32+ target: add in various #define'sgrischka2009-07-181-0/+2
|
* tccpe: build IAT vector with with -run toogrischka2009-07-181-0/+1
| | | | | This prepares for x86_64 where we need the vector for far jumps. Also, resolve DLL symbols in place
* cleanup: stop abuse of sym->c for #define tokenstreamsgrischka2009-07-181-1/+4
|
* cleanup: stop abuse of sym->r for inline functionsgrischka2009-07-181-2/+10
|
* fix build with msvcgrischka2009-05-111-2/+3
|
* enable making tcc using libtccgrischka2009-05-111-11/+13
|
* move static prototypes to libtcc.cgrischka2009-05-111-146/+44
|
* move some global variables into TCCStategrischka2009-05-111-1/+14
|