summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/logic/slbt_exec_link.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index d614f06..0274841 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -724,6 +724,7 @@ static int slbt_exec_link_create_executable(
char wraplnk[PATH_MAX];
bool fabspath;
bool fpic;
+ const struct slbt_source_version * verinfo;
struct slbt_deps_meta depsmeta = {0,0,0,0};
/* initial state */
@@ -761,10 +762,13 @@ static int slbt_exec_link_create_executable(
if (!(ectx->fwrapper = fopen(wrapper,"w")))
return -1;
+ verinfo = slbt_source_version();
+
if (fprintf(ectx->fwrapper,
"#!/bin/sh\n"
"# libtool compatible executable wrapper\n"
- "# Generated by %s (slibtool pre-alpha)\n\n"
+ "# Generated by %s (slibtool %d.%d.%d)\n"
+ "# [commit reference: %s]\n\n"
"if [ -z \"$%s\" ]; then\n"
"\tDL_PATH=\n"
@@ -777,6 +781,8 @@ static int slbt_exec_link_create_executable(
"fi\n\n",
dctx->program,
+ verinfo->major,verinfo->minor,verinfo->revision,
+ verinfo->commit,
dctx->cctx->settings.ldpathenv) < 0)
return -1;
@@ -911,6 +917,7 @@ int slbt_exec_link(
char soxyz [PATH_MAX];
char solnk [PATH_MAX];
char arname[PATH_MAX];
+ const struct slbt_source_version * verinfo;
/* libfoo.so.x.y.z */
if ((size_t)snprintf(soxyz,sizeof(soxyz),"%s%s%s.%d.%d.%d",
@@ -1106,10 +1113,12 @@ int slbt_exec_link(
fnover = !!(dctx->cctx->drvflags & SLBT_DRIVER_AVOID_VERSION);
fvernum = !!(dctx->cctx->verinfo.vernumber);
+ verinfo = slbt_source_version();
ret = fprintf(fout,
"# libtool compatible library wrapper\n"
- "# Generated by %s (slibtool pre-alpha)\n\n"
+ "# Generated by %s (slibtool %d.%d.%d)\n"
+ "# [commit reference: %s]\n\n"
"dlname='%s'\n"
"library_names='%s %s %s'\n"
@@ -1131,8 +1140,10 @@ int slbt_exec_link(
"libdir='%s'\n",
- /* nickname */
+ /* nickname, verinfo */
dctx->program,
+ verinfo->major,verinfo->minor,verinfo->revision,
+ verinfo->commit,
/* dlname */
fnover ? solnk : soxyz,