The attached fix (libcrt.c) is just one example. There seem
many more such introduced from latest commits that look badly
formatted in anyone else's editors and should be fixed.
General recommended policy:
- if possible, do not add new hard tabs ('\t') at all.
Use spaces (soft tabs) instead
- in any case, configure your editor to read/write hard tabs
with width of 8 (eight)
Also:
- Avoid merge commits (unless for very good reason). Instead
use "git cherry-pick" or "git rebase" to put your commits on
top of the public branch. ref: 2a8905c93b
Also:
- jiang: please explain what you are doing, in the commit message
and on the list. Subscribe to the mailing list to receive feedback
from people for your work.
For example, what was wrong with 'parse_number'? Show a test
case and how your version fixes it (it is slower btw).
As per grischka comment, always output a space after macro concatenation
instead of trying to detect if it's necessary as the current approach
has a huge cost.
This adds parsing of (GCC compatible) visibility attribute
in order to mark selected global symbols as hidden. The generated
.o files contain hidden symbols already, the TCC linker doesn't
yet do the right thing.
Not able to generate ELF files on NetBSD yet (lacks the note and crt1.o
is actually named crt0.o on NetBSD), but -run works with these extra
defines:
-D__lint__ -D"__symbolrename(x)=asm(#x)" -D__NetBSD__
The -D__lint__ is an ugly hack, TCC should be able to emulate GCC just
fine, but it seems TCC doesn't support __builtin_va_list yet?
typedef __builtin_va_list __va_list;
/usr/include/sys/ansi.h:72: error: ';' expected (got "__va_list")
- 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 e31579b076
For conformance to ISO C the stdbool.h header has to provide
the macro __bool_true_false_are_defined (defined to 1). Yep,
that name is really in the standard.
*** UNCONDITIONALLY ***
Esp. sihce tinycc winapi headers are not as complete as people might
expect this can otherwise lead to obscure problems that are difficult
to debug.
(Originally 'warn_implicit_function_declaration' was set to 1
always for windows but someone must have deleted that line)
Same as with x86_64, disable the runtime_plt_and_got hack
for -run on arm as well. For that we need to handle several
relocations as (potentially) generating PLT slots as well.
Tested with mpfr-3.1.2 and gawk (both using --disable-shared),
there are two resp. five pre-existing problems, so no regressions.
This also works toward enabling real shared libs for arm,
but it's not there yet.
This makes us use the normal PLT/GOT codepaths also for -run,
which formerly used an on-the-side blob for the jump tables.
For x86_64 only for now, arm coming up.