Unified · Split
| @@ -252,7 +252,7 @@ libtcc.dylib: $(LIBTCC_OBJ) · 251 unmodified lines | ||
| 252 | 252 | |
| 253 | 253 | # OSX libtcc.dylib (without rpath/ prefix) |
| 254 | 254 | libtcc.osx: $(LIBTCC_OBJ) |
| 255 | − $S$(CC) -shared -o libtcc.dylib $^ $(LDFLAGS) | |
| 255 | + $S$(CC) -shared -install_name libtcc.dylib -o libtcc.dylib $^ $(LDFLAGS) | |
| 256 | 256 | |
| 257 | 257 | # windows dynamic libtcc library |
| 258 | 258 | libtcc.dll : $(LIBTCC_OBJ) |
| @@ -1457,10 +1457,7 @@ ST_FUNC void tcc_add_runtime(TCCState *s1) · 1456 unmodified lines | ||
| 1457 | 1457 | tcc_add_btstub(s1); |
| 1458 | 1458 | } |
| 1459 | 1459 | #endif |
| 1460 | − /* libtcc1 is not needed when tccrun mode */ | |
| 1461 | − if (s1->output_type != TCC_OUTPUT_MEMORY){ | |
| 1462 | − tcc_add_support(s1, TCC_LIBTCC1); | |
| 1463 | − } | |
| 1460 | + tcc_add_support(s1, TCC_LIBTCC1); | |
| 1464 | 1461 | #ifndef TCC_TARGET_MACHO |
| 1465 | 1462 | /* add crt end if not memory output */ |
| 1466 | 1463 | if (s1->output_type != TCC_OUTPUT_MEMORY) |
| @@ -813,12 +813,8 @@ ST_FUNC int macho_output_file(TCCState *s1, const char *filename) · 812 unmodified lines | ||
| 813 | 813 | Section *s; |
| 814 | 814 | collect_sections(s1, &mo); |
| 815 | 815 | relocate_syms(s1, s1->symtab, 0); |
| 816 | − if (s1->output_type == TCC_OUTPUT_DLL) { | |
| 817 | − /* TODO: more handling for .dylib ? */ | |
| 818 | − } else { | |
| 819 | − mo.ep->entryoff = get_sym_addr(s1, "main", 1, 1) | |
| 820 | − - get_segment(&mo, 1)->vmaddr; | |
| 821 | − } | |
| 816 | + mo.ep->entryoff = get_sym_addr(s1, "main", 1, 1) | |
| 817 | + - get_segment(&mo, 1)->vmaddr; | |
| 822 | 818 | if (s1->nb_errors) |
| 823 | 819 | goto do_ret; |
| 824 | 820 | |