aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
Commit message (Collapse)AuthorAgeFilesLines
* Only use blx if availableThomas Preud'homme2012-10-161-0/+8
| | | | | | | | Introduce ARM version for the target architecture in order to determine if blx instruction can be used or not. Availability of blx instruction allows for more scenarii supported in R_ARM_CALL relocation. It should also be useful when introducing support for the R_ARM_THM_CALL relocation.
* Add support for arm hardfloat calling conventionThomas Preud'homme2012-06-051-0/+3
| | | | | See Procedure Call Standard for the ARM Architecture (AAPCS) for more details.
* Fix removal of vnrottThomas Preud'homme2012-06-051-0/+1
| | | | Make vrotb ST_FUNC so that arm-gen.c can use vrotb.
* Several multiarch/biarch fixesThomas Preud'homme2012-05-231-5/+4
| | | | | | | | * Add multiarch directories for arm and i386 * Fix detection of biarch: /lib64/ld-linux-x86-64.so.2 is mandated by ABI and is thus always present, even if there is no biarch * Define CONFIG_LDDIR directly with the right value in case of multiarch instead of defining it to /lib and then redifining it.
* Fix CONFIG_LDDIR usageThomas Preud'homme2012-05-221-10/+11
| | | | | | | | | | | | | | | | | | This patch fix 2 bugs in CONFIG_LDDIR usage: * CONFIG_LDDIR used for 2 purposes there is confusion between the directory to find libraries, crt* files and headers and the directory in which the program interpreter is. These two directories are not related. The latter is specified by the ABI and should not be configurable while the former depends on the system (single arch, biarch, multiarch). This end a longstanding issue with amd64 program interpreter later propagated to other architecture interpreters. * If multiarch is in effect, then the library directory should be /lib. /lib64 denotes biarch architecture, everything which is here would be in /lib/x86_64-linux-gnu instead.
* Make sizeof() be of type size_tMichael Matz2012-04-181-1/+1
| | | | | | | | This matters when sizeof is directly used in arithmetic, ala "uintptr_t t; t &= -sizeof(long)" (for alignment). When sizeof isn't size_t (as it's specified to be) this masking will truncate the high bits of the uintptr_t object (if uintptr_t is larger than uint).
* libtcc: tcc_get_symbol uses the TCCState parametergrischka2012-04-181-0/+3
| | | | | This allows using tcc_get_symbol on some other than the current TCCState. (Suggested by David Mertens)
* support "x86_64-linux-gnu" subdirs with lib & includegrischka2012-04-181-14/+21
| | | | suggested for newer ubuntu by Damian Gryski
* tcc.h: unify multiple #ifdef CONFIG_TCC_BACKTRACEgrischka2012-04-181-9/+8
|
* cleanup some partially broken patchesgrischka2012-04-181-2/+2
| | | | | | | | | | | | | | | | | | | - tests/Makefile: fix commit de54586d5b45800e26952ec77b4f51ad4c1e0079 This hunk it unrelated to the other changes (which are about MacOSX). It is not useful and partially wrong. Optional tests are meant to stay optional, btest would work only for i386 - tcc.h: fix commit c52d79605a3c895a16e18f0b7193f1f4b480a60f by unknown The message says it's for MINTW but the patch has obviously no effect for MINGW (which defines __GNUC__). However the patch seems useful for MSC which however needs _strto(u)i64 with underscore. - Makefile: fix commit 5280293d6b16bbe24dfda76e37f32322fa2874ca Do not build tcc.o with -DONE_SOURCE because we finally build tcc from tcc.o and libtcc.a/so
* tcc.c: fix previous commit "Use CString to concat linker options"grischka2012-04-181-6/+6
| | | | | | | | | - remove redunant else branch - zero-terminate linker_arg - declare cstr_xxx as PUB_FUNC (which are functions used in tcc.c but not in the libtcc API. Useful for a tcc(.exe) that uses the libtcc.(so/dll)) - while at it, export PUB_FUNCs from dll
* fix mingw compliationunknown2012-03-161-1/+1
|
* Remove vnrott (duplicate vrotb)Thomas Preud'homme2012-03-141-1/+0
|
* x86_64: fix loading of LLOCAL floatsgrischka2012-03-051-1/+1
| | | | | | | | See also commit 9527c4949fd94adb2567229413c70c19b663a118 On x86_64 we need to extend the reg_classes array because load() is called for (at least) R11 too, which was not part of reg_classes previously.
* tcc.h: define TCC_IS_NATIVEgrischka2012-03-051-12/+22
| | | | | | - disable tccrun feature for non-native (cross-) compilers - define uplong for target adress size - fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
* Fix assumption of 32bit long on portions of ElfAndrew Mulbrook2012-03-031-5/+6
| | | | | | | | | Modify tcc to accept convert full 64bits of specified text section when converting on Win64. Write high bytes to the elf section address as well. This allows creation of elf binaries located in offsets using full 64 bit addresses. Signed-off-by: Andrew Mulbrook <andrew262@gmail.com>
* Revert "Multiple fixes for 64 bit sections"Andrew Mulbrook2012-03-031-6/+5
| | | | This reverts commit d7a7c3769d0a1dcb8400258cd8adf78a8566de61.
* Multiple fixes for 64 bit sectionsmob2012-02-261-5/+6
| | | | | | | | | | | | | | | This changeset attempts to fix a few problems when giving using the high 32bits of a 64bit section offset. There are likely more issues (or perhaps regressions) lurking in the muck here. In general, this moves a few data type declarations to use uplong. Also, add support for 64bit mingw32 building under cygwin. Because native types are used for 64 bit offsets, this won't fix challenges with cross compiling from 32bit -> 64bit. Tested under cygwin, against binary compiled with -Wl,-Ttext=0xffffff8000000000 Signed-off-by: Andrew Mulbrook <andrew262@gmail.com>
* Don't define strtold and strtof on *BSD + uClibcThomas Preud'homme2011-08-121-12/+0
| | | | | | | | | | | | | | Don't define strtold and strtof on *BSD and uClibc as they are already defined there since: * 2001 (FreeBSD 4.4) * 2009 (OpenBSD 4.5) * 2009 (DragonFlyBSD) * 2002 (uClibc) See http://lists.nongnu.org/archive/html/tinycc-devel/2011-07/msg00025.html for a bit more details.
* rename error/warning -> tcc_(error/warning)grischka2011-08-111-3/+3
|
* libtcc: minor adjustmentsgrischka2011-08-111-11/+26
| | | | | | | | | | | | | | | | | - use {B} to substitute tcc_lih_path (instead of \b) - expand CONFIG_TCC_CRTPREFIX in CONFIG_TCC_LIBPATHS which fixes duplicate CONFIG_SYSROOT. - put default CONFIG_SYSROOT ("") into tcc.h - remove hack from commit db6fcce78f4d8ea25036dd6643e9fa83d8e52e5a because $(tccdir)/include is already in sysincludes - configure: error out for unrecognized options. - win32/build-tcc.bat: put libtcc into base dir where it will find lib/include automatically, and build libtcc_test example.
* libtcc: support more than one crtprefixgrischka2011-08-061-4/+4
| | | | Looks like gcc has that. Oh Deer!
* libtcc: cleanup the 'gen_makedeps' stuffgrischka2011-08-061-6/+3
|
* tcc: fix -m32/64 & simplifygrischka2011-08-061-1/+0
| | | | | | | | | | This cleans up the mess from commit 8f985736580926ac53dc367fc293524bf2810cbb and preceeding. - make tcc -m64 work on windows - execvp on windows returns 0 always, replace by spawnvp - remove bizarre support for i386-win32-tcc -m64
* x86-64: fix flags and zero-pad long doublesgrischka2011-08-061-9/+8
| | | | | | | | | | This fixes a bug introduced in commit 8d107d9ffd8126d82b1c56be47431a6bcef39f08 that produced wrong code because of interference between 0x10 bits VT_CONST and x86_64-gen.c:TREG_MEM Also fully zero-pad long doubles on x86-64 to avoid random bytes in output files which disturb file comparison.
* configure: add switches to set search pathsgrischka2011-08-061-19/+50
| | | | | | | | | | | | | | | | | | | --sysincludepaths=.. specify system include paths, colon separated" Sets CONFIG_TCC_SYSINCLUDEPATHS --libpaths=... specify system library paths, colon separated" Sets CONFIG_TCC_LIBPATHS --crtprefix=... specify location of crt?.o" Sets CONFIG_TCC_CRTPREFIX --elfinterp=... specify elf interpreter" Sets CONFIG_TCC_ELFINTERP Also the CONFIG_TCC_XXX were renamed to make them look more consistent. Also move the elf_interp definitions to tcc.h.
* Revert "Add a --multiarch-triplet switch to configure"Thomas Preud'homme2011-08-031-3/+31
| | | | This reverts commit 76adc5770f4ab5b1aaa2e5dde6104efc06431fe2.
* Add a --multiarch-triplet switch to configureThomas Preud'homme2011-08-021-31/+3
| | | | | | | | | | | | | Add a --multiarch-triplet switch to configure. The switch will allow files to be search for each default path in path/<triplet> and then path. Default paths handled that way: - CONFIG_TCC_SYSINCLUDE_PATHS - CONFIG_TCC_LIBPATH - path to crt*.o - path to libgcc_s.so.1 Path missing: elf interpreter path (will be handled in another commit)
* Set CONFIG_TCC_CRT_PREFIX relative to CONFIG_SYSROOTThomas Preud'homme2011-08-011-2/+2
| | | | | Set CONFIG_TCC_CRT_PREFIX relative to CONFIG_SYSROOT for consistency with CONFIG_TCC_LDDIR.
* Accept colon separated paths with -L and -Igrischka2011-08-011-12/+35
| | | | | | | | | | | | | | | | | | This allows passing colon separated paths to tcc_add_library_path tcc_add_sysinclude_path tcc_add_include_path Also there are new configure variables CONFIG_TCC_LIBPATH CONFIG_TCC_SYSINCLUDE_PATHS which define the lib/sysinclude paths all in one and can be overridden from configure/make For TCC_TARGET_PE semicolons (;) are used as separators Also, \b in the path string is replaced by s->tcc_lib_path (CONFIG_TCCDIR rsp. -B option)
* win64: va_arg with structuresgrischka2011-07-141-7/+9
|
* tccpe: cleanup ELFW() macros etc.grischka2011-07-141-0/+18
|
* tccrun: win64: add unwind function table for dynamic codegrischka2011-07-141-4/+5
| | | | | This works only when tcc.exe is compiled using MSC. MinGW does something in the startup code that defeats it.
* make: create native tcc from separate objectsgrischka2011-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This was already possible using make NOTALLINONE=1 and is now the default. To build as previously from one big source, use make ONE_SOURCE=1 Cross compilers are still build from one source because using separate objects requires separate build directories one per platform which currently is not (yet) supported by the makefile. We could probably use gnu-makeish target variables like $(I386_CROSS): OUTDIR=build/i386 $(X64_CROSS): OUTDIR=build/x86-64 and so on ... Also NEED_FLOAT_TYPES for arm-gen is removed. It was about variables that are referenced from outside (libtcc, tccgen). We could declare them in tcc.h (as with reg_classes) or have them twice in arm-gen.c. I chose option 2.
* win32: add -Wl,--stack=xxx switchgrischka2011-07-111-0/+1
| | | | | | | | For example: $ tcc -Wl,--stack=4194309 which means 4 MB. Default is 1 MB.
* Add configuration of include subdirectoriesThomas Preud'homme2011-07-071-0/+3
| | | | | | | | Add the possibility to search headers in several subdirectories of /usr/local/include and /usr/include. A possible use case would be for tcc to search for headers in /usr/local/include/x86_64-linux-gnu, /usr/local/include, /usr/include/x86_64-linux-gnu and /usr/include in turn.
* Add multiarch dirs to linker search pathThomas Preud'homme2011-07-051-6/+7
| | | | | | | | | | | By default, tcc search libraries in /lib and /usr/local/lib while crt*.o files are searched in /usr/lib and ld.so is searched in /lib. Unfortunetely the path are hardcoded in source code. This patch allow tcc to look in an other directory and also to look in extra directories. It's then possible to make tcc search libraries in /lib/x86_64-linux-gnu and /usr/local/lib/x86_64-linux-gnu while crt*.o files are searched in /usr/lib/x86_64-linux-gnu and ld.so is searched in /lib/x86_64-linux-gnu.
* VLA fix [3/3]: store VLA sizeofs in anonymous runtime stack varsJoe Soroka2011-04-091-1/+0
|
* re-apply VLA by Thomas Preud'hommeJoe Soroka2011-04-061-1/+3
|
* revert complicated & broken flexible array member handlingJoe Soroka2011-03-181-3/+1
|
* partially revert e23194aJoe Soroka2011-03-081-1/+0
| | | | see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00002.html
* support c99 for-loop init declsJoe Soroka2011-03-071-0/+1
|
* tccgen: handle __attribute((alias("target")))Joe Soroka2011-03-031-0/+1
|
* fix another static struct init issue (arrays with unknown size at end)Jaroslav Kysela2011-02-221-1/+3
|
* Fix fct asm label: only valid for declarationThomas Preud'homme2011-02-091-1/+1
| | | | | | | | | - Fix function assembly label mechanism introduced in commit 9b09fc376e8c212a767c875e71ca003e3b9a0d2e to only accept alternative name for function declaration. - merge the code with the one introduced in commit 264a103610e3ee86b27b8cbb0e4ec81cd654d980. - Don't memorize token for asm label but directly the asm label.
* revert "update VT_STRUCT_SHIFT for new VT_VLA"Joe Soroka2011-02-041-1/+1
|
* Revert "Implement C99 Variable Length Arrays"Thomas Preud'homme2011-02-051-2/+0
| | | | This reverts commit a5a50eaafeea0d3ca47bc8fb6baf983743470c60.
* Revert "Reorder increasingly VT_* constants in tcc.h"Thomas Preud'homme2011-02-051-12/+12
| | | | This reverts commit 7f00523e2e1938fc3558164521fe3ecefd9e1747.
* update VT_STRUCT_SHIFT for new VT_VLAJoe Soroka2011-02-041-1/+1
|
* Reorder increasingly VT_* constants in tcc.hThomas Preud'homme2011-02-041-12/+12
|