summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-26 04:56:18 +0000
committermidipix <writeonce@midipix.org>2024-02-26 05:11:57 +0000
commitb5e10411a1c764c7b7f82b8b1ff093df7546d028 (patch)
tree4bf144d1119ce78f5a045bfe8ba6aa0ed77f6077 /src/driver
parent489101c7b5e84298eba80777b0ec22cb39ad11a7 (diff)
downloadslibtool-b5e10411a1c764c7b7f82b8b1ff093df7546d028.tar.bz2
slibtool-b5e10411a1c764c7b7f82b8b1ff093df7546d028.tar.xz
driver: added the --nm switch.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index b3fe43a..c9cbdd6 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -397,6 +397,7 @@ int slbt_lib_get_driver_ctx(
const char * cfgmeta_host;
const char * cfgmeta_ar;
const char * cfgmeta_as;
+ const char * cfgmeta_nm;
const char * cfgmeta_ranlib;
const char * cfgmeta_dlltool;
@@ -455,6 +456,7 @@ int slbt_lib_get_driver_ctx(
cfgmeta_host = 0;
cfgmeta_ar = 0;
cfgmeta_as = 0;
+ cfgmeta_nm = 0;
cfgmeta_ranlib = 0;
cfgmeta_dlltool = 0;
@@ -662,6 +664,11 @@ int slbt_lib_get_driver_ctx(
cfgmeta_as = cfgexplicit;
break;
+ case TAG_NM:
+ cctx.host.nm = entry->arg;
+ cfgmeta_nm = cfgexplicit;
+ break;
+
case TAG_RANLIB:
cctx.host.ranlib = entry->arg;
cfgmeta_ranlib = cfgexplicit;
@@ -888,6 +895,9 @@ int slbt_lib_get_driver_ctx(
if (ctx->cctx.host.as && !cfgmeta_as)
cfgmeta_as = cfglconf;
+ if (ctx->cctx.host.nm && !cfgmeta_nm)
+ cfgmeta_nm = cfglconf;
+
if (ctx->cctx.host.ranlib && !cfgmeta_ranlib)
cfgmeta_ranlib = cfglconf;
@@ -936,6 +946,7 @@ int slbt_lib_get_driver_ctx(
cfgmeta_host,
cfgmeta_ar,
cfgmeta_as,
+ cfgmeta_nm,
cfgmeta_ranlib,
cfgmeta_dlltool))
return slbt_lib_get_driver_ctx_fail(&ctx->ctx,0);
@@ -944,6 +955,9 @@ int slbt_lib_get_driver_ctx(
if (slbt_driver_parse_tool_argv(ctx->cctx.host.ar,&ctx->host.ar_argv) < 0)
return slbt_lib_get_driver_ctx_fail(&ctx->ctx,0);
+ if (slbt_driver_parse_tool_argv(ctx->cctx.host.nm,&ctx->host.nm_argv) < 0)
+ return slbt_lib_get_driver_ctx_fail(&ctx->ctx,0);
+
if (slbt_driver_parse_tool_argv(ctx->cctx.host.ranlib,&ctx->host.ranlib_argv) < 0)
return slbt_lib_get_driver_ctx_fail(&ctx->ctx,0);