OpenBSD: Fix crt startup names - WIP

This commit is contained in:
Christian Jullien
2020-11-29 08:47:27 +01:00
parent 4e12c2a6dc
commit dfe031caa6
2 changed files with 10 additions and 2 deletions

View File

@@ -1429,7 +1429,11 @@ ST_FUNC void tcc_add_runtime(TCCState *s1)
#endif
if (strlen(TCC_LIBTCC1) > 0)
tcc_add_support(s1, TCC_LIBTCC1);
#ifndef TCC_TARGET_MACHO
#if defined(__OpenBSD__)
/* add crt end if not memory output */
if (s1->output_type != TCC_OUTPUT_MEMORY)
tcc_add_crt(s1, "crtend.o");
#elif !defined(TCC_TARGET_MACHO)
/* add crt end if not memory output */
if (s1->output_type != TCC_OUTPUT_MEMORY)
tcc_add_crt(s1, "crtn.o");