aboutsummaryrefslogtreecommitdiff
path: root/win32/lib/crt1.c
diff options
context:
space:
mode:
authorgrischka <grischka>2017-02-20 18:58:08 +0100
committergrischka <grischka>2017-02-20 18:58:08 +0100
commit5f33d313c8a2455ff9036cd7f7028339bdbde622 (patch)
treee620f3c5a67e0f785046ee188ffbd00e593c2212 /win32/lib/crt1.c
parent399237850d87be8ef1179d2592ade660152aaabc (diff)
downloadtinycc-5f33d313c8a2455ff9036cd7f7028339bdbde622.tar.gz
tinycc-5f33d313c8a2455ff9036cd7f7028339bdbde622.tar.bz2
tcc: re-enable correct option -r support
Forgot about it. It allows to compile several sources (and other .o's) to one single .o file; tcc -r -o all.o f1.c f2.c f3.S o4.o ... Also: - option -fold-struct-init-code removed, no effect anymore - (tcc_)set_environment() moved to tcc.c - win32/lib/(win)crt1 minor fix & add dependency - debug line output for asm (tcc -c -g xxx.S) enabled - configure/Makefiles: x86-64 -> x86_64 changes - README: cleanup
Diffstat (limited to 'win32/lib/crt1.c')
-rw-r--r--win32/lib/crt1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/lib/crt1.c b/win32/lib/crt1.c
index a9b1a30..2cb25c0 100644
--- a/win32/lib/crt1.c
+++ b/win32/lib/crt1.c
@@ -73,15 +73,18 @@ int _runtmain(int argc, /* as tcc passed in */ char **argv)
_startupinfo start_info = {0};
__tgetmainargs(&wargc, &wargv, &wenv, _dowildcard, &start_info);
+ /* may be wrong when tcc has received wildcards (*.c) */
if (argc < wargc)
wargv += wargc - argc;
+ else
+ argc = wargc;
#define argv wargv
#endif
#ifdef __i386
_controlfp(_PC_53, _MCW_PC);
#endif
- return _tmain(argc, argv, NULL);
+ return _tmain(argc, argv, _tenviron);
}
// =============================================