summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-05-09 00:28:55 -0400
committermidipix <writeonce@midipix.org>2018-05-09 00:28:55 -0400
commitc61b5b501561b48b2d9c1037e3dd950f64cf10b7 (patch)
tree6d7cb71d0bdf1477c240cb01127278a4f2981451
parentf5983e8071d8b87b6f14c64f3f8564e934f49d7b (diff)
downloadslibtool-c61b5b501561b48b2d9c1037e3dd950f64cf10b7.tar.bz2
slibtool-c61b5b501561b48b2d9c1037e3dd950f64cf10b7.tar.xz
driver: -shrext support: only use the extension portion of the extension.
-rw-r--r--src/driver/slbt_driver_ctx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 94e7e9c..9031323 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -644,6 +644,7 @@ static void slbt_init_flavor_settings(
{
const struct slbt_host_params * host;
const struct slbt_flavor_settings * settings;
+ const char * dot;
host = ahost ? ahost : &cctx->host;
@@ -670,7 +671,8 @@ static void slbt_init_flavor_settings(
memcpy(psettings,settings,sizeof(*settings));
if (cctx->shrext)
- psettings->dsosuffix = cctx->shrext;
+ psettings->dsosuffix = (dot = strrchr(cctx->shrext,'.'))
+ ? dot : cctx->shrext;
}
static int slbt_init_ldrpath(