From d2d5afeab5a5a0eaaef67b602dcea7ca76c74809 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 14 Feb 2024 13:28:49 +0000 Subject: link mode: finalize support of darwin's syntax for the -no-undefined switch. --- src/logic/linkcmd/slbt_linkcmd_executable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/logic/linkcmd/slbt_linkcmd_executable.c b/src/logic/linkcmd/slbt_linkcmd_executable.c index cbb6ffe..449928f 100644 --- a/src/logic/linkcmd/slbt_linkcmd_executable.c +++ b/src/logic/linkcmd/slbt_linkcmd_executable.c @@ -116,7 +116,9 @@ int slbt_exec_link_create_executable( /* --no-undefined */ if (dctx->cctx->drvflags & SLBT_DRIVER_NO_UNDEFINED) - *ectx->noundef = "-Wl,--no-undefined"; + *ectx->noundef = !strcmp(dctx->cctx->host.host,"darwin") + ? "-Wl,-undefined,error" + : "-Wl,--no-undefined"; /* executable wrapper: create */ if (slbt_snprintf(wrapper,sizeof(wrapper), -- cgit v1.2.3