diff options
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -992,7 +992,9 @@ static void add_init_array_defines(TCCState *s1, const char *section_name) /* add tcc runtime libraries */ static void tcc_add_runtime(TCCState *s1) { +#if defined(CONFIG_TCC_BCHECK) || !defined(CONFIG_USE_LIBGCC) char buf[1024]; +#endif #ifdef CONFIG_TCC_BCHECK if (do_bounds_check) { @@ -1028,8 +1030,12 @@ static void tcc_add_runtime(TCCState *s1) if (!s1->nostdlib) { tcc_add_library(s1, "c"); +#ifdef CONFIG_USE_LIBGCC + tcc_add_file(s1, CONFIG_SYSROOT "/lib/libgcc_s.so.1"); +#else snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "libtcc1.a"); tcc_add_file(s1, buf); +#endif } /* add crt end if not memory output */ if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) { |
