summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-03 19:46:57 -0400
committermidipix <writeonce@midipix.org>2016-04-04 18:04:52 -0400
commit93b62c7d9abbb324853cd0df1ff5aeda27e3b5aa (patch)
treeebb90d4c2f1ad8c87b060edfb4f182d6645f1302 /src
parentb1f9773c9f2e22980e7835813e29c5866287336c (diff)
downloadslibtool-93b62c7d9abbb324853cd0df1ff5aeda27e3b5aa.tar.bz2
slibtool-93b62c7d9abbb324853cd0df1ff5aeda27e3b5aa.tar.xz
driver: added -no-undefined support.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c4
-rw-r--r--src/internal/slibtool_driver_impl.h1
-rw-r--r--src/logic/slbt_exec_ctx.c3
-rw-r--r--src/skin/slbt_skin_default.c4
4 files changed, 12 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index be43926..cb4aefb 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -697,6 +697,10 @@ int slbt_get_driver_ctx(
cctx.drvflags |= SLBT_DRIVER_ANTI_PIC;
break;
+ case TAG_NO_UNDEFINED:
+ cctx.drvflags |= SLBT_DRIVER_NO_UNDEFINED;
+ break;
+
case TAG_SHARED:
cctx.drvflags &= ~(uint64_t)SLBT_DRIVER_STATIC;
break;
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 2753bf0..6798ed9 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -39,6 +39,7 @@ enum app_tags {
TAG_PREFER_NON_PIC,
TAG_SHARED,
TAG_STATIC,
+ TAG_NO_UNDEFINED,
TAG_COMPILER_FLAG,
TAG_VERBATIM_FLAG,
};
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c
index 5529c0e..141a621 100644
--- a/src/logic/slbt_exec_ctx.c
+++ b/src/logic/slbt_exec_ctx.c
@@ -220,6 +220,8 @@ int slbt_get_exec_ctx(
ictx->ctx.fpic = &ictx->ctx.argv[i++];
ictx->ctx.cass = &ictx->ctx.argv[i++];
+
+ ictx->ctx.noundef = &ictx->ctx.argv[i++];
ictx->ctx.lout[0] = &ictx->ctx.argv[i++];
ictx->ctx.lout[1] = &ictx->ctx.argv[i++];
ictx->ctx.sentinel= &ictx->ctx.argv[i++];
@@ -334,6 +336,7 @@ void slbt_reset_placeholders(struct slbt_exec_ctx * ectx)
*ectx->fpic = "-USLIBTOOL_PLACEHOLDER_FPIC";
*ectx->cass = "-USLIBTOOL_PLACEHOLDER_COMPILE_ASSEMBLE";
+ *ectx->noundef = "-USLIBTOOL_PLACEHOLDER_NO_UNDEFINED";
*ectx->lout[0] = "-USLIBTOOL_PLACEHOLDER_OUTPUT_SWITCH";
*ectx->lout[1] = "-USLIBTOOL_PLACEHOLDER_OUTPUT_FILE";
*ectx->sentinel= 0;
diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c
index 8339024..e5f2648 100644
--- a/src/skin/slbt_skin_default.c
+++ b/src/skin/slbt_skin_default.c
@@ -122,5 +122,9 @@ const struct argv_option slbt_default_options[] = {
0,"<flag>",
"pass a raw flag to the compiler"},
+ {"no-undefined", 0,TAG_NO_UNDEFINED,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "disallow unresolved references"},
+
{0,0,0,0,0,0,0,0}
};