aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorbellard <bellard>2004-10-27 21:24:42 +0000
committerbellard <bellard>2004-10-27 21:24:42 +0000
commit3e74b91de606f393629bd7e97a2fdf0153ea3e6d (patch)
tree801e38a58c6c5f2e073cd2a652c419ea7df5fd27 /tccelf.c
parente657dfb4914afe3972c5bae8cd640b46c4048e8c (diff)
downloadtinycc-3e74b91de606f393629bd7e97a2fdf0153ea3e6d.tar.gz
tinycc-3e74b91de606f393629bd7e97a2fdf0153ea3e6d.tar.bz2
correct libtcc1 link order
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tccelf.c b/tccelf.c
index c5dc023..12bdc8d 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -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) {