mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
.. | ||
patch-configure | ||
patch-libtcc.c | ||
patch-Makefile | ||
patch-tccelf.c | ||
patch-z1-preproc | ||
README.tccelf | ||
texi2pod.pl |
The patches in this directory include some updates to tcc 0.9.25. Some of them have been committed in the main tcc repository so we will not need them in future updates. In particular: 1. ELF file format (merged upstream) tcc 0.9.25 produces an ELF executable which is good for linux but not for FreeBSD. It misses the PHDR section which is almost mandatory for shared executables, puts in the .dynsym section some relocation info that FreeBSD expects to be in .got, and expect the relocation sections to be contiguous. patch-tccelf.c tries to address the above problem using conditional sections (so hopefully can be imported upstream) and also adds the ability to override the name of the dynamic loader through an environment variable (this is important to debug tcc). The resulting elf file is still not 100% correct -- if you strip it, the program will not run (presumably there is some dangling reference). Other than that, program do seem to run correctly. 2. predefined macros (partially merged upstream) patch-libtcc.c adds/fixes some predefined macros when compiling on FreeBSD: these are __FreeBSD__ and the usual set of __i386__ and __unix__ variants. It also #defines __builtin_inline(x,y), __PRETTY_FUNCTION__, __CC_SUPPORTS___INLINE, __aligned(x), __packed that are used in cdefs.h and by several user programs. Note that tcc recognises the __aligned__ and __packed__ attributes but does not honor them. 3. -include, -M and other preprocessor directives patch-z1-preproc (name chosen because it must be applied after the other two) implements -include, -M (and related options), and makes tcc ignore -isystem and -std= which are often used to build code.