summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-10-25 22:26:30 -0400
committermidipix <writeonce@midipix.org>2017-10-26 01:03:43 -0400
commitfbda3a30a94210a48e797fa9c9dc635f3afaceb9 (patch)
tree8ad8665cdf3154773df1f6dccf0b3f3a422043fe /src/driver
parentb6abc337906e43f92f50e075f49df407946fc6fe (diff)
downloadslibtool-fbda3a30a94210a48e797fa9c9dc635f3afaceb9.tar.bz2
slibtool-fbda3a30a94210a48e797fa9c9dc635f3afaceb9.tar.xz
driver: added --mdso and --implib support.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 8100e0a..8d2fa6e 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -532,6 +532,31 @@ static int slbt_init_host_params(
host->dlltool = drvhost->dlltool;
}
+ /* mdso */
+ if (host->mdso)
+ cfgmeta->mdso = cfgexplicit;
+
+ else if (strcmp(host->flavor,"cygwin")
+ && strcmp(host->flavor,"midipix")
+ && strcmp(host->flavor,"mingw")) {
+ host->mdso = "";
+ cfgmeta->mdso = "not applicable";
+
+ } else {
+ if (!(drvhost->mdso = calloc(1,toollen)))
+ return -1;
+
+ if (fnative) {
+ strcpy(drvhost->mdso,"mdso");
+ cfgmeta->mdso = cfgnative;
+ } else {
+ sprintf(drvhost->mdso,"%s-mdso",host->host);
+ cfgmeta->mdso = cfghost;
+ }
+
+ host->mdso = drvhost->mdso;
+ }
+
return 0;
}
@@ -555,6 +580,9 @@ static void slbt_free_host_params(struct slbt_host_strs * host)
if (host->dlltool)
free(host->dlltool);
+ if (host->mdso)
+ free(host->mdso);
+
memset(host,0,sizeof(*host));
}
@@ -902,6 +930,18 @@ int slbt_get_driver_ctx(
break;
+ case TAG_IMPLIB:
+ if (!strcmp("idata",entry->arg)) {
+ cctx.drvflags |= SLBT_DRIVER_IMPLIB_IDATA;
+ cctx.drvflags &= ~(uint64_t)SLBT_DRIVER_IMPLIB_DSOMETA;
+
+ } else if (!strcmp("never",entry->arg)) {
+ cctx.drvflags |= SLBT_DRIVER_IMPLIB_DSOMETA;
+ cctx.drvflags &= ~(uint64_t)SLBT_DRIVER_IMPLIB_IDATA;
+ }
+
+ break;
+
case TAG_WARNINGS:
if (!strcmp("all",entry->arg))
cctx.warnings = SLBT_WARNING_LEVEL_ALL;
@@ -963,6 +1003,10 @@ int slbt_get_driver_ctx(
cctx.host.dlltool = entry->arg;
break;
+ case TAG_MDSO:
+ cctx.host.mdso = entry->arg;
+ break;
+
case TAG_OUTPUT:
cctx.output = entry->arg;
break;