summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-15 21:16:46 +0000
committermidipix <writeonce@midipix.org>2021-04-16 07:37:52 +0000
commit89f5e3327da73886837264325c7c4484da0fc257 (patch)
treedcd4a207f70c8fe89d64629e6d3ef9b533984ff2 /src/logic
parentd83e2a924d440e26f83402622e96eeec9a0deb6d (diff)
downloadslibtool-89f5e3327da73886837264325c7c4484da0fc257.tar.bz2
slibtool-89f5e3327da73886837264325c7c4484da0fc257.tar.xz
link mode: -module without -rpath is an executable, not a dynamic library.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_link.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index c593423..b1c242c 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1963,19 +1963,21 @@ int slbt_exec_link(
return SLBT_NESTED_ERROR(dctx);
/* dynamic library via -module */
- if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) {
- if (!dot || strcmp(dot,".la")) {
- if (slbt_exec_link_create_library(
- dctx,ectx,
- ectx->dsobasename,
- ectx->dsofilename,
- ectx->relfilename)) {
+ if (dctx->cctx->rpath && !fstaticonly) {
+ if (dctx->cctx->drvflags & SLBT_DRIVER_MODULE) {
+ if (!dot || strcmp(dot,".la")) {
+ if (slbt_exec_link_create_library(
+ dctx,ectx,
+ ectx->dsobasename,
+ ectx->dsofilename,
+ ectx->relfilename)) {
+ slbt_free_exec_ctx(actx);
+ return SLBT_NESTED_ERROR(dctx);
+ }
+
slbt_free_exec_ctx(actx);
- return SLBT_NESTED_ERROR(dctx);
+ return 0;
}
-
- slbt_free_exec_ctx(actx);
- return 0;
}
}