summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-02 14:09:32 -0400
committermidipix <writeonce@midipix.org>2016-04-02 19:34:01 -0400
commita0c318b083f7e44049838b16c79c186617cd923e (patch)
treee8a08c11f198ab355a80fed9d3a81b245bfff900
parent4c76f7e588baf71574c3e7b536632f46db39af3d (diff)
downloadslibtool-a0c318b083f7e44049838b16c79c186617cd923e.tar.bz2
slibtool-a0c318b083f7e44049838b16c79c186617cd923e.tar.xz
link mode: slbt_exec_link: integrate creation of shared (pic objects) archive.
-rw-r--r--src/logic/slbt_exec_link.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 639d014..53724c4 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -24,6 +24,21 @@
/* */
/*******************************************************************/
+/*******************************************************************/
+/* */
+/* -o <ltlib> switches input result */
+/* ---------- --------------------- ----- ------ */
+/* libfoo.la -shared bar.lo libfoo.la */
+/* .libs/libfoo.a */
+/* .libs/libfoo.la (lnk) */
+/* */
+/* ar cru .libs/libfoo.a .libs/bar.o */
+/* ranlib .libs/libfoo.a */
+/* (generate libfoo.la) */
+/* ln -s ../libfoo.la .libs/libfoo.la */
+/* */
+/*******************************************************************/
+
static bool slbt_adjust_input_argument(char * arg, bool fpic)
{
char * slash;
@@ -213,6 +228,16 @@ int slbt_exec_link(
return -1;
}
+ /* pic libfoo.a */
+ if (dot && !strcmp(dot,".la"))
+ if (slbt_exec_link_create_archive(
+ dctx,ectx,
+ ectx->arfilename,
+ true)) {
+ slbt_free_exec_ctx(actx);
+ return -1;
+ }
+
/* no wrapper? */
if (!dot || strcmp(dot,".la")) {
slbt_free_exec_ctx(actx);