diff options
author | midipix <writeonce@midipix.org> | 2021-03-23 22:28:03 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-03-23 22:28:03 +0000 |
commit | 9a5f9681f88126c47e11ef49e7fb01c604c90986 (patch) | |
tree | f6e01e310a6fa68b73a6baeb75d2aa5a68e28692 /src/logic/slbt_exec_install.c | |
parent | 7e54e27c804d44c9252b749927b4b06f0dca3391 (diff) | |
download | slibtool-9a5f9681f88126c47e11ef49e7fb01c604c90986.tar.bz2 slibtool-9a5f9681f88126c47e11ef49e7fb01c604c90986.tar.xz |
install mode: account for a libfoo.a that was created with -disable-static.
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r-- | src/logic/slbt_exec_install.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c index 3cf0e12..f87db59 100644 --- a/src/logic/slbt_exec_install.c +++ b/src/logic/slbt_exec_install.c @@ -340,6 +340,7 @@ static int slbt_exec_install_entry( bool fexe = false; bool fpe; bool frelease; + bool farchive; size_t slen; struct stat st; @@ -419,12 +420,6 @@ static int slbt_exec_install_entry( dot = strrchr(srcfile,'.'); strcpy(dot,dctx->cctx->settings.arsuffix); - if (!(dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC)) - if (slbt_copy_file(dctx,ectx, - srcfile, - dest ? (char *)dest->arg : *dst)) - return SLBT_NESTED_ERROR(dctx); - /* dot/suffix */ strcpy(slnkname,srcfile); dot = strrchr(slnkname,'.'); @@ -436,6 +431,20 @@ static int slbt_exec_install_entry( /* libfoo.a --> libfoo.so */ strcpy(dot,dsosuffix); + /* libfoo.a installation */ + if (!(dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC)) + farchive = true; + else if (slbt_symlink_is_a_placeholder(slnkname)) + farchive = true; + else + farchive = false; + + if (farchive) + if (slbt_copy_file(dctx,ectx, + srcfile, + dest ? (char *)dest->arg : *dst)) + return SLBT_NESTED_ERROR(dctx); + /* PE support: does .libs/libfoo.so.def exist? */ if ((size_t)snprintf(dstfile,sizeof(dstfile),"%s.def", slnkname) >= sizeof(dstfile)) |