summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-04 12:55:31 -0400
committermidipix <writeonce@midipix.org>2016-05-04 12:55:31 -0400
commitbb2555de865f03074014a042459d69c34a2b4b3c (patch)
tree4fa24b6accca3bb90d062329c10745bef1a1dcd3
parentf7acc1109f966594c13fe42e32e754e9584f3a9d (diff)
downloadslibtool-bb2555de865f03074014a042459d69c34a2b4b3c.tar.bz2
slibtool-bb2555de865f03074014a042459d69c34a2b4b3c.tar.xz
link mode: legabits: generate a perfectly compatible wrapper.
-rw-r--r--src/logic/slbt_exec_link.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index d964df0..d48eff8 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -997,6 +997,8 @@ int slbt_exec_link(
{
int ret;
const char * output;
+ const char * header;
+ const char * base;
char * dot;
FILE * fout;
struct slbt_exec_ctx * actx;
@@ -1212,8 +1214,21 @@ int slbt_exec_link(
fvernum = !!(dctx->cctx->verinfo.vernumber);
verinfo = slbt_source_version();
+ /* wrapper header */
+ if (dctx->cctx->drvflags & SLBT_DRIVER_LEGABITS) {
+ header = " - a libtool library file\n";
+
+ if ((base = strrchr(output,'/')))
+ base++;
+ else
+ base = output;
+ } else {
+ header = "libtool compatible library wrapper\n";
+ base = "";
+ }
+
ret = fprintf(fout,
- "# libtool compatible library wrapper\n"
+ "# %s%s"
"# Generated by %s (slibtool %d.%d.%d)\n"
"# [commit reference: %s]\n\n"
@@ -1237,6 +1252,9 @@ int slbt_exec_link(
"libdir='%s'\n",
+ /* wrapper header */
+ base,header,
+
/* nickname, verinfo */
dctx->program,
verinfo->major,verinfo->minor,verinfo->revision,