| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
replaces f5f82abc99424c4ece836000934fcf57a867c635
Also: fix tcc flags in Makefile, fix tcc -E
|
| |
|
|
| |
- taking advantage of previous commit "incremental -Wl parsing"
|
| |
|
|
| |
parse -Wl linker options immediately
|
| |
|
|
| |
- does not change signature of tcc_add_file
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
warning when compiled with MinGW 32/64 gcc compilers
|
| |
|
|
|
|
|
| |
The lexer is for reading files, not for writing.
Also :
- macro_is_equal(): avoid crash if redefining __FILE__
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
| |
|
|
|
| |
This is done by impression of the pcc -C option.
Usual execution path and speed are not changed.
|
| |
|
|
| |
This takes care of case-insensitive filenames (like on win32)
|
| |
|
|
| |
Missed these in e946eb2a4109e0de5f8514457f851897a4824c3e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Vlad Vissoultchev
Date: Mon, 11 Apr 2016 01:26:32 +0300
Subject: Fix pragma once guard when compiling multiple source files
When compiling multiple source files directly to executable cached
include files guard was incorrectly checked for TOK_once in ifndef_macro
member.
If two source files included the same header guarded by pragma once, then
the second one erroneously skipped it as `cached_includes` is not cleared
on second `tcc_compile`
|
| |
|
|
| |
assign fopen("/dev/null","w") to the s->ppfp insteed of NULL
|
| | |
|
| |
|
|
|
|
| |
This only silences "cannot find library" error and allows Makefiles targeting gcc to not complain about missing libraries
If there is custom libm then standard handling applies.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
build-tcc.bat
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
* Documentation is now in "docs".
* Source code is now in "src".
* Misc. fixes here and there so that everything still works.
I think I got everything in this commit, but I only tested this
on Linux (Make) and Windows (CMake), so I might've messed
something up on other platforms...
|
| | |
|
| |
|
|
|
|
|
|
| |
functionality was broken some time ago and was removed
by the "tccpp: fix issues, add tests"
fix: LINE_MACRO_OUTPUT_FORMAT_NONE in pp_line()
means: output '\n' and not "don't output at all"
|
| |
|
|
| |
print stats to stderr, not to stdout
|
| |
|
|
|
|
| |
* remove free_defines() from tcc_preprocess()
all cleanup will be done in tcc_delete
* move a preprocessor file closing to tcc_delete too
|
| |
|
|
|
|
| |
A new version of the MEM_DEBUG will be submitted next. This version is
not depend on the malloc_usable_size() presense in the libc and
print a places where a leaked chunks of memory was allocated.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix some macro expansion issues
* add some pp tests in tests/pp
* improved tcc -E output for better diff'ability
* remove -dD feature (quirky code, exotic feature,
didn't work well)
Based partially on ideas / researches from PipCet
Some issues remain with VA_ARGS macros (if used in a
rather tricky way).
Also, to keep it simple, the pp doesn't automtically
add any extra spaces to separate tokens which otherwise
would form wrong tokens if re-read from tcc -E output
(such as '+' '=') GCC does that, other compilers don't.
* cleanups
- #line 01 "file" / # 01 "file" processing
- #pragma comment(lib,"foo")
- tcc -E: forward some pragmas to output (pack, comment(lib))
- fix macro parameter list parsing mess from
a3fc54345949535524d01319e1ca6378b7c2c201
a715d7143d9d17da17e67fec6af1c01409a71a31
(some coffee might help, next time ;)
- introduce TOK_PPSTR - to have character constants as
written in the file (similar to TOK_PPNUM)
- allow '\' appear in macros
- new functions begin/end_macro to:
- fix switching macro levels during expansion
- allow unget_tok to unget more than one tok
- slight speedup by using bitflags in isidnum_table
Also:
- x86_64.c : fix decl after statements
- i386-gen,c : fix a vstack leak with VLA on windows
- configure/Makefile : build on windows (MSYS) was broken
- tcc_warning: fflush stderr to keep output order (win32)
|
| |
|
|
|
| |
set linker options only when "s->output_type == TCC_OUTPUT_EXE"
otherwise tcc will produce a wrong object file
|
| |
|
|
|
| |
a prior error message: cannot find 'program_resolve_lib'
after a patch: cannot find library 'libprogram_resolve_lib'
|
| | |
|
| |
|
|
|
|
| |
This reverts commit 8615bb40fb39bf7435462ca54cbbc24aaecae502.
Reverting as it breaks on MinGW targets
|
| | |
|
| |
|
|
| |
Usage example: tcc -c -xc ex5.cgi -xn ex2.c ex7.c ex6.cgi
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usage example: tcc -xc ex5.cgi
From a gcc docs:
You can specify the input language explicitly with the -x option:
-x language
Specify explicitly the language for the following input files
(rather than letting the compiler choose a default based on the file
name suffix). This option applies to all following input files until
the next -x option. Possible values for language are:
c c-header c-cpp-output
c++ c++-header c++-cpp-output
objective-c objective-c-header objective-c-cpp-output
objective-c++ objective-c++-header objective-c++-cpp-output
assembler assembler-with-cpp
ada
f77 f77-cpp-input f95 f95-cpp-input
java
-x none
Turn off any specification of a language, so that subsequent files
are handled according to their file name suffixes (as they are if -x
has not been used at all)
|
| |
|
|
|
| |
move call to print_defines() from tcc.c to the libtcc.c
define a print_defines() as a ST_FUNC
|
| |
|
|
|
|
|
|
|
|
|
| |
Win32, Win64, WinCE when executing "tcc -v". Example
$ ./i386-win-tcc -v
tcc version 0.9.26 (i386, mingw)
instead of the
tcc version 0.9.26 (i386, Win32)
There is a cpu info already about bits of the excution environment
And display C67 for the TCC_TARGET_C67
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tcc version 0.9.26 (i386 Linux)
Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard
Usage: tcc [options...] [-o outfile] [-c] infile(s)...
tcc [options...] -run infile [arguments...]
...
instead of the
tcc version 0.9.26 - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard
Usage: tcc [options...] [-o outfile] [-c] infile(s)...
tcc [options...] -run infile [arguments...]
...
Displaing a "Hard Float" info for the ARM arch is restored. It was broken by the AArm64 patch.
|
| |
|
|
|
|
|
|
|
| |
With this option on a defines are included into the output
(inside comments). This will allow to debug a problems like:
In file included from math.c:8:
In file included from /usr/include/math.h:43:
/usr/include/bits/nan.h:52: warning: NAN redefined
|
| |
|
|
|
|
|
|
|
|
|
| |
tcc -E -P
do not output a #line directive, a gcc compatible option
tcc -E -P1
don't follow a gcc preprocessor style and do output a standard
#line directive. In such case we don't lose a location info when
we going to compile a resulting file wtith a compiler not
understanding a gnu style line info.
|
| | |
|
| |
|
|
| |
Try "tcc -E -c tccasm.c -o tccasm.o"
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- remove -norunsrc switch
Meaning and usage (-run -norun...???) look sort of screwed. Also
general usefulness is unclear, so it was actually to support exactly
one (not even very interesting) test
This partially reverts e31579b0769e1f9c0947d12e83316d1149307b1a
|