| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
| |
add_elf_sym is a confusing name because it is not clear what the
function does compared to put_elf_sym. As a matter of fact, put_elf_sym
also adds a symbol in a symbol table. Besides, "add_elf_sym" fails to
convey that the function can be used to update a symbol (for instance
its value). "set_elf_sym" seems like a more appropriate name: it will
set a symbol to a given set of properties (value, size, etc.) and create
a new one if non exist for that name as one would expect.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- call RtlDeleteFunctionTable
(important for multiple compilations)
- the RUNTIME_FUNCTION* is now at the beginning of the
runtime memory. Therefor when tcc_relocate is called
with user memory, this should be done manually before
it is free'd:
RtlDeleteFunctionTable(*(void**)user_mem);
[ free(user_mem); ]
- x86_64-gen.c: expand char/short return values to int
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
FreeBSDs system headers contain unconditional usage of
macros like __aligned(x), which are only conditionally defined
in sys/cdefs.h (conditional on __GNUC__ or __INTEL_COMPILER).
Bug in FreeBSD, but as work-around we can define __GNUC__ which
picks up these defs.
[This also moves back the glibc defines we had before into the
non-BSD ifdef branch]
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
__GNUC__ nowadays as macro seems to mean the "GNU C dialect"
rather than the compiler itself. See also
http://gcc.gnu.org/ml/gcc/2008-07/msg00026.html
This patch will probably cause problems of various kinds but
maybe we should try nonetheless.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makefile :
- do not 'uninstall' peoples /usr/local/doc entirely
libtcc.c :
- MEM_DEBUG : IDE-friendly output "file:line: ..."
- always ELF for objects
tccgen.c :
- fix memory leak in new switch code
- move static 'in_sizeof' out of function
profiling :
- define 'static' to empty
resolve_sym() :
- replace by dlsym()
win32/64: fix R_XXX_RELATIVE fixme
- was fixed for i386 already in
8e4d64be2fc1d707c7800c5096f6e0ea22cbd
- do not -Lsystemdir if compiling to .o
|
| |
|
|
|
|
|
|
| |
#ifndef guards are cached, however after #elif on the
same level, the file must be re-read.
Also: preprocess asm as such even when there is no
assembler (arm).
|
| |
|
|
| |
... and other minor cosmetic fixes
|
| |
|
|
|
|
|
| |
Too much code. gcc 3.x doesn't have that either.
This reverts commit 41785a0bf9d505a3647a10ddc330417f52fd4528.
This reverts commit 21665f433890e2038626f0b3123b189a62a67dc9.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Except
- that libtcc1.a is now installed in subdirs i386/ etc.
- the support for arm and arm64
- some of the "Darwin" fixes
- tests are mosly unchanged
Also
- removed the "legacy links for cross compilers" (was total mess)
- removed "out-of-tree" build support (was broken anyway)
|
| |
|
|
| |
- taking advantage of previous commit "incremental -Wl parsing"
|
| |
|
|
| |
parse -Wl linker options immediately
|
| |
|
|
|
|
|
|
|
| |
-- Not a fix
This reverts commit 089ce6235c99638ad4542a57af4d09e2be0efc88.
Revert "handle a -s option by executing sstrip/strip program"
-- related, not a fix.
This reverts commit 5cd4393a542ef4c64df7dcbb3fbe3a629666239d.
|
| |
|
|
|
|
|
| |
tccelf.c : force linking bcheck by adding elf symbol __bound_init
bcheck.c : use (size_t)1 for x86_64
Fixes 7e7e6148fdb4adbda936f80b5d4ac3d738908d95
|
| |
|
|
| |
- does not change signature of tcc_add_file
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- "utf8 in identifiers"
from 936819a1b90f2618bb3f86730189cf2895948ba0
- CValue: remove member str.data_allocated
- make tiny allocator private to tccpp
- allocate macro_stack objects on heap
because otherwise it could crash after error/setjmp
in preprocess_delete():end_macro()
- mov "TinyAlloc" defs to tccpp.c
- define_push: take int* str again
|
| |
|
|
|
|
|
|
|
| |
Also:
- allow more than one item per line
- respect "quoted items" and escaped quotes \"
(also for LIBTCCAPI tcc_setoptions)
- cleanup some copy & paste
|
| |
|
|
|
| |
Abusing filename[0] as type is just too much of a hack.
-- From 05364072042ff37904a7b0b14cdd85a1ea1ca11d
|
| |
|
|
|
|
|
| |
copy & paste coding, twisted control flow
This reverts commit a13f183e4c2c4b4d1d40e142b57a4298672dfd2c.
Also, set linker args for DLLs also.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... also for built-in defines
The case:
$ tcc -D FOO a.c b.c
with
// a.c
#undef FOO
// b.c
#ifndef FOO
# error -D FOO has been lost
#endif
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- would parse linker args in two different places
- would mess up "tcc -v ..." output:
tcc -v test.c
-> test.c
+> test.c
- would use function "tcc_load_alacarte()" to do the contrary of
what its name suggests.
This reverts commit 19a169ceb896f78205bc23b847938c58f14d1dda.
|
| | |
|
| | |
|
| |
|
|
| |
PUB_FUNC to allow tcc.exe build again.
|
| |\
| |
| |
| | |
Add Visual Studio processor identification
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
| |
Smaller change to fix more cases
This reverts commit 0f36f60faa05da7e250a4b4eebd4b534e8a2b537.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A patch is implemented as suggested in tinycc-devel mail list.
From: Reuben Thomas
Date: Thu, 31 Jul 2014 16:52:53 +0100
Subject: [PATCH] Add --{no,}-whole-archive support
I resurrected the patch supplied to the mailing list in 2009
Since --whole-archive is a useful flag to get tcc working with
autotools, and of course in its own right, I suggest you have a look
at the patch and see if it is acceptable. I cannot see any suggestion
that it was actively rejected last time round, just no evidence that
it was ever added.
|
| |
|
|
|
|
|
| |
a patch from tcc bugzilla.
From: Reuben Thomas
Date: Thu, 31 Jul 2014 13:50:13 +0100
Subject: [PATCH] libtcc.c: add memory model macros __{L,}LP64__
|
| |
|
|
|
|
|
| |
The lexer is for reading files, not for writing.
Also :
- macro_is_equal(): avoid crash if redefining __FILE__
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... for fast redeclaration checks
Also, check function parameters too:
void foo(int a) { int a; ... }
Also, try to fix struct/union/enum's on different scopes:
{ struct xxx { int x; };
{ struct xxx { int y; }; ... }}
and some (probably not all) combination with incomplete
declarations "struct xxx;"
Replaces 2bfedb18675228c3837c23fa523231f55e102c12
and 07d896c8e5d1b46bf4aebd403c78e5f7ffebe02a
Fixes cf95ac399cbce1ea8a519f91dd36a5cfd4ea7943
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
don't catch redefinition for local vars. With this option on
tcc accepts the following code:
int main()
{
int a = 0;
long a = 0;
}
But if you shure there is no problem with your local variables,
then a compilation speed can be improved if you have a lots of
the local variables (50000+)
|
| |
|
|
|
|
| |
Alignment of unknown sections changed from 32 to PTR_SIZE
This is gcc/pcc default value. This helps to use
tcc as linux kernel compiler.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- better `TOK_HASH_FUNC`
- increases `hash_ident` initial size to 16k (from 8k)
- `cstr_cat` uses single `realloc` + `memcpy`
- `cstr_cat` can append terminating zero
- `tok_str_realloc` initial size to 16 (from 8)
- `parse_define` uses static `tokstr_buf`
- `next` uses static `tokstr_buf`
- fixes two latent bugs (wrong deallocations in libtcc.c:482 and
tccpp.c:2987)
|
| |
|
|
|
| |
* pcc have only __linux__ macro (and no __linux)
* pcc don't have __clear_cache proc
|
| |
|
|
|
| |
This is done by impression of the pcc -C option.
Usual execution path and speed are not changed.
|
| |
|
|
| |
This moves listfiles parsing inline in `tcc_parse_args1`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Vlad Vissoultchev
Date: Tue, 12 Apr 2016 20:43:15 +0300
Subject: Allow tcc arguments to be read from @listfiles
This allows all @ prefixed arguments to be treated as listfiles
containing list of source files or tcc options where each one is on a
separate line. Can be used to benchmark compilation speed with
non-trivial amount of source files.
The impl of `tcc_parse_args` had to be moved to a new function that is
able to be called recursively w/ the original one remaining as a driver
of the new one. Listfiles parsing happens in a new
`args_parser_add_listfile` function that uses `tcc_open`/`tcc_close/inp`
for buffered file input.
|
| |
|
|
|
|
| |
There was already support for -dD option but in contrast -dM dumps only `#define` directives w/o actual preprocessor output.
The original -dD output differs from gcc output by additional comment in front of `#define`s so this quirk is left for -dM as well.
|
| |
|
|
|
|
| |
remove non-existent or duplicate directories from include paths
if -fnormalize-inc-dirs is specified. This will help
to compile current coreutils package
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tcc_normalize_inc_dirs: normally no problem to be absolutly
gcc compatible as long as it can be done the tiny way.
This reverts to the state before recent related commits and
reimplements a (small) part of it to fix the reported problem.
Also: Revert "parsing "..." sequence"
c3975cf27c792d493e76a2058a1eaf588324053e
&& p[1] == '.'
is not a reliable way to lookahead
|
| |
|
|
|
|
|
| |
- avoid memory allocation by using its (int) token number
- avoid additional function parameter by using Attribute
Also: fix some strange looking error messages
|