diff options
-rw-r--r-- | include/slibtool/slibtool.h | 2 | ||||
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 4 | ||||
-rw-r--r-- | src/internal/slibtool_driver_impl.h | 1 | ||||
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 3 | ||||
-rw-r--r-- | src/skin/slbt_skin_default.c | 4 |
5 files changed, 14 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index b084eae..beeda86 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -50,6 +50,7 @@ extern "C" { #define SLBT_DRIVER_HEURISTICS 0x010000 #define SLBT_DRIVER_STRICT 0x020000 +#define SLBT_DRIVER_NO_UNDEFINED 0x040000 /* execution modes */ enum slbt_mode { @@ -91,6 +92,7 @@ struct slbt_exec_ctx { char ** dpic; char ** fpic; char ** cass; + char ** noundef; char ** lout[2]; char ** sentinel; char * csrc; 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} }; |