summaryrefslogtreecommitdiffhomepage
path: root/src/logic/slbt_exec_ctx.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-22 07:49:01 -0400
committermidipix <writeonce@midipix.org>2016-04-23 09:25:13 -0400
commitf633074f6dae55ae9599c11a085f824c67881676 (patch)
treeeefe0a3d2639fb325692e7d639f7fb794e321891 /src/logic/slbt_exec_ctx.c
parentd117fced27de17371e60d15a34fd0200d6d2c81a (diff)
downloadslibtool-f633074f6dae55ae9599c11a085f824c67881676.tar.bz2
slibtool-f633074f6dae55ae9599c11a085f824c67881676.tar.xz
execution context: account for -module when constructing relevant strings.
Diffstat (limited to 'src/logic/slbt_exec_ctx.c')
-rw-r--r--src/logic/slbt_exec_ctx.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index 4719f04..ad4ffa7 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -146,6 +146,8 @@ int slbt_get_exec_ctx(
char * ch;
char * mark;
char * slash;
+ const char * arprefix;
+ const char * dsoprefix;
const char * ref;
int i;
@@ -268,11 +270,20 @@ int slbt_get_exec_ctx(
/* linking: arfilename, lafilename, dsofilename */
if (dctx->cctx->mode == SLBT_MODE_LINK && dctx->cctx->libname) {
+ /* arprefix, dsoprefix */
+ if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) {
+ arprefix = "";
+ dsoprefix = "";
+ } else {
+ arprefix = dctx->cctx->settings.arprefix;
+ dsoprefix = dctx->cctx->settings.dsoprefix;
+ }
+
/* arfilename */
ictx->ctx.arfilename = ch;
ch += sprintf(ch,"%s%s%s%s",
ictx->ctx.ldirname,
- dctx->cctx->settings.arprefix,
+ arprefix,
dctx->cctx->libname,
dctx->cctx->settings.arsuffix);
ch++;
@@ -283,9 +294,7 @@ int slbt_get_exec_ctx(
ictx->ctx.lafilename = ch;
ch += sprintf(ch,"%s%s%s.la",
ictx->ctx.ldirname,
- (dctx->cctx->drvflags & SLBT_DRIVER_MODULE)
- ? ""
- : dctx->cctx->settings.dsoprefix,
+ dsoprefix,
dctx->cctx->libname);
ch++;
@@ -294,9 +303,7 @@ int slbt_get_exec_ctx(
ictx->ctx.dsofilename = ch;
ch += sprintf(ch,"%s%s%s%s",
ictx->ctx.ldirname,
- (dctx->cctx->drvflags & SLBT_DRIVER_MODULE)
- ? ""
- : dctx->cctx->settings.dsoprefix,
+ dsoprefix,
dctx->cctx->libname,
dctx->cctx->settings.dsosuffix);
ch++;
@@ -305,7 +312,7 @@ int slbt_get_exec_ctx(
ictx->ctx.deffilename = ch;
ch += sprintf(ch,"%s%s%s%s.def",
ictx->ctx.ldirname,
- dctx->cctx->settings.dsoprefix,
+ dsoprefix,
dctx->cctx->libname,
dctx->cctx->settings.dsosuffix);
ch++;