summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-09-27 00:00:12 -0400
committermidipix <writeonce@midipix.org>2016-09-27 00:00:12 -0400
commite3d03d442aad186e5d00e278fb7d80fcaba42c97 (patch)
tree4e5ac17057a3f964b42624829eca9acb724b5df7
parentd22d016db5fbc087602327ca99cb45b0a1c08c43 (diff)
downloadslibtool-e3d03d442aad186e5d00e278fb7d80fcaba42c97.tar.bz2
slibtool-e3d03d442aad186e5d00e278fb7d80fcaba42c97.tar.xz
link mode: confirm need for archive import; limit .a deps to external deps.
-rw-r--r--src/logic/slbt_exec_link.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index a9d0603..0f35272 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -508,7 +508,8 @@ static int slbt_exec_link_create_dep_file(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char ** altv,
- const char * libfilename)
+ const char * libfilename,
+ bool farchive)
{
char ** parg;
char * popt;
@@ -555,6 +556,8 @@ static int slbt_exec_link_create_dep_file(
plib = popt + 10;
} else if (!strncmp(*parg,"-f",2)) {
(void)0;
+ } else if (farchive) {
+ (void)0;
} else if ((popt = strrchr(*parg,'.')) && !strcmp(popt,".la")) {
/* import dependency list */
if ((base = strrchr(*parg,'/')))
@@ -806,7 +809,9 @@ static int slbt_exec_link_create_archive(
return SLBT_NESTED_ERROR(dctx);
/* .deps */
- if (slbt_exec_link_create_dep_file(dctx,ectx,ectx->cargv,arfilename))
+ if (slbt_exec_link_create_dep_file(
+ dctx,ectx,ectx->cargv,
+ arfilename,true))
return SLBT_NESTED_ERROR(dctx);
/* ar spawn */
@@ -888,7 +893,9 @@ static int slbt_exec_link_create_library(
slbt_adjust_input_argument(*parg,".lo",".o",true);
/* .deps */
- if (slbt_exec_link_create_dep_file(dctx,ectx,ectx->cargv,dsofilename))
+ if (slbt_exec_link_create_dep_file(
+ dctx,ectx,ectx->cargv,
+ dsofilename,false))
return slbt_exec_link_exit(
&depsmeta,
SLBT_NESTED_ERROR(dctx));