Showing the changes to libtcc.c (1 of 2 files). Show all
Unified · Split
| @@ -1091,7 +1091,11 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) · 1090 unmodified lines | |||
| 1091 | /* add libc crt1/crti objects */ | 1091 | /* add libc crt1/crti objects */ |
| 1092 | if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) && | 1092 | if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) && |
| 1093 | !s->nostdlib) { | 1093 | !s->nostdlib) { |
| 1094 | #ifndef TCC_TARGET_MACHO | 1094 | #if defined(__OpenBSD__) |
| 1095 | if (output_type != TCC_OUTPUT_DLL) | ||
| 1096 | tcc_add_crt(s, "crt0.o"); | ||
| 1097 | tcc_add_crt(s, "crtbegin.o"); | ||
| 1098 | #elif !defined(TCC_TARGET_MACHO) | ||
| 1095 | /* Mach-O with LC_MAIN doesn't need any crt startup code. */ | 1099 | /* Mach-O with LC_MAIN doesn't need any crt startup code. */ |
| 1096 | if (output_type != TCC_OUTPUT_DLL) | 1100 | if (output_type != TCC_OUTPUT_DLL) |
| 1097 | tcc_add_crt(s, "crt1.o"); | 1101 | tcc_add_crt(s, "crt1.o"); |