From a0c318b083f7e44049838b16c79c186617cd923e Mon Sep 17 00:00:00 2001 From: midipix Date: Apr 02 2016 23:34:01 +0000 Subject: link mode: slbt_exec_link: integrate creation of shared (pic objects) archive. --- 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 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);