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
10401040 /* add libc crt1/crti objects */
10411041 if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
10421042 !s->nostdlib) {
1043+#ifndef TCC_TARGET_MACHO
1044+ /* Mach-O with LC_MAIN doesn't need any crt startup code. */
10431045 if (output_type != TCC_OUTPUT_DLL)
10441046 tcc_add_crt(s, "crt1.o");
10451047 tcc_add_crt(s, "crti.o");
1048+#endif
10461049 }
10471050 #endif
10481051 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