Unified · Split
| @@ -849,9 +849,12 @@ static void tcc_add_runtime(TCCState *s1) · 848 unmodified lines | |||
| 849 | #endif | 849 | #endif |
| 850 | } | 850 | } |
| 851 | #endif | 851 | #endif |
| 852 | /* add libc if not memory output */ | 852 | /* add libc */ |
| 853 | if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) { | 853 | if (!s1->nostdlib) { |
| 854 | tcc_add_library(s1, "c"); | 854 | tcc_add_library(s1, "c"); |
| 855 | } | ||
| 856 | /* add crt end if not memory output */ | ||
| 857 | if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) { | ||
| 855 | tcc_add_file(s1, CONFIG_TCC_CRT_PREFIX "/crtn.o"); | 858 | tcc_add_file(s1, CONFIG_TCC_CRT_PREFIX "/crtn.o"); |
| 856 | } | 859 | } |
| 857 | /* add various standard linker symbols */ | 860 | /* add various standard linker symbols */ |