summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-02 13:19:09 -0400
committermidipix <writeonce@midipix.org>2016-04-02 13:19:09 -0400
commit3b5e3de1568cf2792dcb73d40f06156c8eaeeb52 (patch)
treea2e88708b334e6b87df674ddca6b7567e9047794 /src
parent6d048d58ab50cfa0ab21296fcb803e064382558a (diff)
downloadslibtool-3b5e3de1568cf2792dcb73d40f06156c8eaeeb52.tar.bz2
slibtool-3b5e3de1568cf2792dcb73d40f06156c8eaeeb52.tar.xz
link mode: use slbt_exec_link_static_archive for both pic and non-pic archives.
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_link.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 7cea3ca..3ddbe6f 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -47,10 +47,11 @@ static bool slbt_adjust_input_argument(char * arg, bool fpic)
}
}
-static int slbt_exec_link_static_archive(
+static int slbt_exec_link_create_archive(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
- const char * arfilename)
+ const char * arfilename,
+ bool fpic)
{
char ** aarg;
char ** parg;
@@ -84,7 +85,7 @@ static int slbt_exec_link_static_archive(
/* input argument adjustment */
for (parg=ectx->cargv; *parg; parg++)
- if (slbt_adjust_input_argument(*parg,false))
+ if (slbt_adjust_input_argument(*parg,fpic))
*aarg++ = *parg;
*aarg = 0;
@@ -157,7 +158,7 @@ int slbt_exec_link(
/* non-pic libfoo.a */
if (dot && !strcmp(dot,".a"))
- if (slbt_exec_link_static_archive(dctx,ectx,output)) {
+ if (slbt_exec_link_create_archive(dctx,ectx,output,false)) {
slbt_free_exec_ctx(actx);
return -1;
}