correct libtcc1 link order

tcc-xref
bellard 2004-10-27 21:24:42 +00:00
parent e657dfb491
commit 3e74b91de6
1 changed files with 3 additions and 4 deletions

View File

@ -956,10 +956,6 @@ static void tcc_add_runtime(TCCState *s1)
{
char buf[1024];
if (!s1->nostdlib) {
snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "libtcc1.a");
tcc_add_file(s1, buf);
}
#ifdef CONFIG_TCC_BCHECK
if (do_bounds_check) {
unsigned long *ptr;
@ -993,6 +989,9 @@ static void tcc_add_runtime(TCCState *s1)
/* add libc */
if (!s1->nostdlib) {
tcc_add_library(s1, "c");
snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "libtcc1.a");
tcc_add_file(s1, buf);
}
/* add crt end if not memory output */
if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) {