summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2022-11-04 23:11:23 +0000
committermidipix <writeonce@midipix.org>2022-11-04 23:33:29 +0000
commit5e02698d061d467abbf21ff857e9862e37060f89 (patch)
tree0df96adc8866dc2861e54a59f5859d750ec565f6
parentbb281c20fa1027e1391d0c1251640ec96e9009f6 (diff)
downloadslibtool-5e02698d061d467abbf21ff857e9862e37060f89.tar.bz2
slibtool-5e02698d061d467abbf21ff857e9862e37060f89.tar.xz
driver: added -weak support, currently a no-op.
-rw-r--r--src/driver/slbt_driver_ctx.c7
-rw-r--r--src/internal/slibtool_driver_impl.h3
-rw-r--r--src/skin/slbt_skin_default.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 4a9e757..4a5bf62 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -615,6 +615,10 @@ static int slbt_split_argv(
*targv++ = argv[i++];
*targv++ = argv[i];
+ } else if (!(strcmp("weak",&argv[i][1]))) {
+ *targv++ = argv[i++];
+ *targv++ = argv[i];
+
} else if (!(strcmp("static-libtool-libs",&argv[i][1]))) {
*targv++ = argv[i];
@@ -1684,6 +1688,9 @@ int slbt_get_driver_ctx(
case TAG_STATIC:
cmdstatic = entry;
break;
+
+ case TAG_WEAK:
+ break;
}
}
}
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 4e5dfdf..0971fd9 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -15,7 +15,7 @@
#include "slibtool_dprintf_impl.h"
#include "argv/argv.h"
-#define SLBT_OPTV_ELEMENTS 64
+#define SLBT_OPTV_ELEMENTS 128
extern const struct argv_option slbt_default_options[];
@@ -78,6 +78,7 @@ enum app_tags {
TAG_COMPILER_FLAG,
TAG_VERBATIM_FLAG,
TAG_THREAD_SAFE,
+ TAG_WEAK,
};
struct slbt_split_vector {
diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c
index a41b6d0..3be3b74 100644
--- a/src/skin/slbt_skin_default.c
+++ b/src/skin/slbt_skin_default.c
@@ -300,6 +300,11 @@ const struct argv_option slbt_default_options[] = {
0,"<flag>",
"pass a raw flag to the compiler linker-driver"},
+ {"weak", 0,TAG_WEAK,ARGV_OPTARG_REQUIRED,
+ ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,
+ 0,"<LIBNAME>",
+ "hint only, currently a no-op"},
+
{"no-undefined", 0,TAG_NO_UNDEFINED,ARGV_OPTARG_NONE,
ARGV_OPTION_HYBRID_ONLY,0,0,
"disallow unresolved references"},