History

macos: don't like in crt startup code

it's not needed with LC_MAIN executables.

Michael Matz committed 6 years ago

Commit ef730c41 parent 51f15d91 file · +3 −0Browse files

Unified · Split

libtcc.c+3−0
@@ -1040,9 +1040,12 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) · 1039 unmodified lines
1040 /* add libc crt1/crti objects */1040 /* add libc crt1/crti objects */
1041 if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&1041 if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
1042 !s->nostdlib) {1042 !s->nostdlib) {
1043#ifndef TCC_TARGET_MACHO
1044 /* Mach-O with LC_MAIN doesn't need any crt startup code. */
1043 if (output_type != TCC_OUTPUT_DLL)1045 if (output_type != TCC_OUTPUT_DLL)
1044 tcc_add_crt(s, "crt1.o");1046 tcc_add_crt(s, "crt1.o");
1045 tcc_add_crt(s, "crti.o");1047 tcc_add_crt(s, "crti.o");
1048#endif
1046 }1049 }
1047#endif1050#endif
1048 return 0;1051 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t