diff options
author | midipix <writeonce@midipix.org> | 2018-06-21 11:32:34 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-06-21 11:32:34 -0400 |
commit | 40a467b11cd162e20302193d6afeda67997b8050 (patch) | |
tree | 26cd343f76852b3e582d9b396db8e105193edab8 /src/logic | |
parent | 2baf1cc107ba6041a3856b77d33140ac876ad6f0 (diff) | |
download | slibtool-40a467b11cd162e20302193d6afeda67997b8050.tar.bz2 slibtool-40a467b11cd162e20302193d6afeda67997b8050.tar.xz |
link mode: slbt_exec_link_create_dep_file(): record top-level -L arguments.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/slbt_exec_link.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index 5cf3355..f49574e 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -626,6 +626,7 @@ static int slbt_exec_link_create_dep_file( char ** parg; char * popt; char * plib; + char * path; char * mark; char * base; size_t size; @@ -655,6 +656,7 @@ static int slbt_exec_link_create_dep_file( for (parg=altv; *parg; parg++) { popt = 0; plib = 0; + path = 0; if (!strcmp(*parg,"-l")) { popt = *parg++; @@ -668,6 +670,18 @@ static int slbt_exec_link_create_dep_file( } else if (!strncmp(*parg,"--library=",10)) { popt = *parg; plib = popt + 10; + } else if (!strcmp(*parg,"-L")) { + popt = *parg++; + path = *parg; + } else if (!strcmp(*parg,"--library-path")) { + popt = *parg++; + path = *parg; + } else if (!strncmp(*parg,"-L",2)) { + popt = *parg; + path = popt + 2; + } else if (!strncmp(*parg,"--library-path=",15)) { + popt = *parg; + path = popt + 15; } else if (!strncmp(*parg,"-f",2)) { (void)0; } else if ((popt = strrchr(*parg,'.')) && !strcmp(popt,".la")) { @@ -804,6 +818,10 @@ static int slbt_exec_link_create_dep_file( if (plib) if (fprintf(ectx->fdeps,"-l%s\n",plib) < 0) return SLBT_SYSTEM_ERROR(dctx); + + if (path) + if (fprintf(ectx->fdeps,"-L%s\n",path) < 0) + return SLBT_SYSTEM_ERROR(dctx); } if (fflush(ectx->fdeps)) |