| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(cond ? 0 : ptr)->member wasn't handled correctly. If one arm
is a null pointer constant (which also can be a pointer) the result
type is that of the other arm.
|
| |
|
|
|
| |
This allows using tcc_get_symbol on some other than the
current TCCState. (Suggested by David Mertens)
|
| |
|
|
| |
suggested for newer ubuntu by Damian Gryski
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
| |
This reverts commit 16202e054f0385499ec16463b87e23c97dc02328.
Changed win32 build to use ONE_SOURCE just like libtcc.dll
Therefore CString can be used again...
|
| | |
|
| |
|
|
|
|
|
|
| |
This reverts commit 1c11b857fe87a73d7047701dacdbe8394967b1d1.
On windows, libtcc.c is compiled with ONE_SOURCE and then tcc.c is
linked to it. Thus tcc.c can only use public functions which cstr_* are
not.
|
| |
|
|
|
| |
As suggested, change type of linker_arg variable to the more appropriate CString
type, since linker_arg is about dynamically grown string.
|
| |
|
|
|
|
|
|
|
| |
elements in linker_arg are used in TCCState structure and must thus not
be freed when option parsing is finished. Declare linker_arg as a global
static variable and free it after tcc_delete has been called on TCCState
structure.
This fix commit 7fb0482a4645d59068ccefe44a3a022b649e5a3a
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ld support arguments to multiple-letter options being passed in two
ways:
* -opt=arg
* -opt arg
libtool generate command line of the second form. This commit add
support for the second form so that libtool works with tcc. The way it
is done is to concatenate all -Wl options into one and then pass it to
set_linker.
|
| |
|
|
|
| |
Quick and dirty hack to consider long int constant (as in 1UL or 1L) as
64 bits integer on x86-64 non Windows systems.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Other tests still have issues, currently with weak linking.
One of the primary stumbling blocks on OSX is the lack of support for
mach-o binaries. Therefore all tcc usage on OSX has to be limited to elf
binaries, presumably produced by tcc itself.
Therefore I had to enable building of tiny_libmaker for OSX. Then changed
the make to use tcc and tiny_libmaker to compile the tcclib1.
In order to compile the tests, specifically the parts that use weak linking,
I have had to define MACOSX_DEPLOYMENT_TARGET to 10.2, which seems like a
hack, but extensive searching seems to indicate that this is the only way
to make apple gcc allow weak linking. Using any other value, bigger or smaller
breaks weak linking.
Also added _ANSI_SOURCE define required by some OSX headers, and some cosmetic
gitignore changes. I believe these changes should not impact other platforms.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
- disable tccrun feature for non-native (cross-) compilers
- define uplong for target adress size
- fix using -Wl,-Ttext=... for Win64 (tccpe: ADDR3264 imagebase)
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
This reverts commit d7a7c3769d0a1dcb8400258cd8adf78a8566de61.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 9b09fc3 ("Add support of asm label for functions",
05-09-2010) tcc has had the capability to rename functions at the
assembly level. This capability was subsequently used by commit
2596273 ("Add support for __REDIRECT_NTH needed with eglibc",
11-09-2010) to redirect long double functions on platforms which
did not support long double.
Here we add the companion macro __REDIRECT which is used (along
with __REDIRECT_NTH) in the glibc headers on Linux to support the
Large File API (when _FILE_OFFSET_BITS is set to 64).
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
to the appropriate CFLAGS. In addition, memory hooks are very different
on OSX, so build of bcheck.c had to be disabled for now.
Change of the CFLAGS does affect builds on other platforms, and this needs
to be tested.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applied patch found on stackoverflow (link below). I also found some
related changes that looked like logically needed. The stackoverflow
changes addressed only two registers which were breaking a compile.
However reading the code in the same file shows two other register
accesses that, while not breaking the build, should have the same fix.
http://stackoverflow.com/questions/3712902/problems-compiling-tcc-on-os-x/3713144#3713144
The test driver was changed by changing 'cp -u' into 'cp' as '-u' is not
supported on mac osx.
I found that osx build required the WITHOUT_LIBTCC define. I suspect the
reason for this is tcc unability to handle mach-o files. In order to
properly address this I had to change 'configure' to propagate target os
name to Makefile.
Current state is that simple tests work, but not the whole 'make test'
suite runs.
To the best of my knowledge, these changes should not impact other
platforms.
|
| |
|
|
| |
These loads clobbered ebx as TinyCC wanted to load the address into st0.
|
| |
|
|
|
|
|
|
| |
tcc should now error out when compiling code like:
VOID ExitProcess(UINT uExitCode);
(…)
retCode = ExitProcess(pi.dwProcessId);
|
| | |
|
| |
|
|
|
| |
Only compile the content of tccasm.c if inline assembly is supported for
this architecture by testing the presence of macro TCC_CONFIG_ASM.
|
| |
|
|
|
|
| |
Remove the previous logic to link a named file with a loader script by
using tcc_add_dll instead. Hence, all files can be linked, not only
files ending in .so/.def.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
TinyCC fails to link correctly to libraries when both R_ARM_PLT32 and
R_ARM_GOT32 relocation to a same symbol exist (see
http://lists.nongnu.org/archive/html/tinycc-devel/2010-05/msg00032.html
for more details).
The patch marks all undefined weak symbols found in external libraries
as strong. The value of all remaining weak symbols is set to zero just
before the section is output.
Note by Thomas Preud'homme: it's been 2 months in Debian without any new
bug report, hence commiting.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| | |
|
| |
|
|
| |
Looks like gcc has that. Oh Deer!
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
gcc -O0 didn't like this.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--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.
|
| | |
|
| |
|
|
| |
This reverts commit 76adc5770f4ab5b1aaa2e5dde6104efc06431fe2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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_SYSROOT for consistency
with CONFIG_TCC_LDDIR.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
| |
This reverts commit b2f5ee9b2de40e26ba3d92cf3950be6da7766b7d as it's
useless on mob.
|