Mercurial > hg > qcc
diff tccelf.c @ 564:d89a6822b7e0
Use library search path for crt?.o, and for ld script libraries with no path.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 11 Mar 2008 23:45:07 -0500 |
parents | 646f1f0972b6 |
children | c42c2145d359 |
line wrap: on
line diff
--- a/tccelf.c Tue Mar 11 23:22:40 2008 -0500 +++ b/tccelf.c Tue Mar 11 23:45:07 2008 -0500 @@ -1014,7 +1014,7 @@ tcc_add_library(s1, "tinyccrt-" TINYCC_TARGET); // add crt end if not memory output if (tccg_output_type != TCC_OUTPUT_MEMORY) - tcc_add_file(s1, CC_CRTDIR "/crtn.o"); + tcc_add_dll(s1, "crtn.o", AFF_PRINT_ERROR); } } @@ -2334,8 +2334,10 @@ return ret; } else { /* TODO: Implement AS_NEEDED support. Ignore it for now */ - if (!as_needed) - tcc_add_file(s1, filename); + if (!as_needed) { + if (*filename=='/') tcc_add_file(s1, filename); + else tcc_add_dll(s1, filename, AFF_PRINT_ERROR); + } } t = ld_next(s1, filename, sizeof(filename)); if (t == ',') {