From fbda3a30a94210a48e797fa9c9dc635f3afaceb9 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 25 Oct 2017 22:26:30 -0400 Subject: driver: added --mdso and --implib support. --- src/driver/slbt_driver_ctx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'src/driver') 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; -- cgit v1.2.3