summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-16 03:25:19 +0000
committermidipix <writeonce@midipix.org>2024-02-16 03:25:19 +0000
commit5ddd2aa439b1ce23b4322cf0abd89a49a8533606 (patch)
treed5944da8fb12e076b56e0d49f9b7577f90918246
parent35000fa828ed7c786c3e6fb0379edd968663cd02 (diff)
downloadslibtool-5ddd2aa439b1ce23b4322cf0abd89a49a8533606.tar.bz2
slibtool-5ddd2aa439b1ce23b4322cf0abd89a49a8533606.tar.xz
driver: internals: allows storing a distinct argument vector for each tool.
-rw-r--r--src/driver/slbt_host_params.c19
-rw-r--r--src/internal/slibtool_driver_impl.h6
2 files changed, 25 insertions, 0 deletions
diff --git a/src/driver/slbt_host_params.c b/src/driver/slbt_host_params.c
index 690ca30..9fe8153 100644
--- a/src/driver/slbt_host_params.c
+++ b/src/driver/slbt_host_params.c
@@ -485,6 +485,18 @@ int slbt_init_host_params(
return 0;
}
+static void slbt_free_host_tool_argv(char ** argv)
+{
+ char ** parg;
+
+ if (!argv)
+ return;
+
+ for (parg=argv; *parg; parg++)
+ free(*parg);
+
+ free(argv);
+}
void slbt_free_host_params(struct slbt_host_strs * host)
{
@@ -515,6 +527,13 @@ void slbt_free_host_params(struct slbt_host_strs * host)
if (host->mdso)
free(host->mdso);
+ slbt_free_host_tool_argv(host->ar_argv);
+ slbt_free_host_tool_argv(host->as_argv);
+ slbt_free_host_tool_argv(host->ranlib_argv);
+ slbt_free_host_tool_argv(host->windres_argv);
+ slbt_free_host_tool_argv(host->dlltool_argv);
+ slbt_free_host_tool_argv(host->mdso_argv);
+
memset(host,0,sizeof(*host));
}
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 2c5ea39..631a1b6 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -112,6 +112,12 @@ struct slbt_host_strs {
char * windres;
char * dlltool;
char * mdso;
+ char ** ar_argv;
+ char ** as_argv;
+ char ** ranlib_argv;
+ char ** windres_argv;
+ char ** dlltool_argv;
+ char ** mdso_argv;
};
struct slbt_obj_list {