summaryrefslogtreecommitdiff
path: root/src/logic/linkcmd
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-14 04:19:35 +0000
committermidipix <writeonce@midipix.org>2024-02-14 04:19:35 +0000
commit816e2809f45c52162aa68281f61450cfbb38d8d0 (patch)
treed240930d9cfcc45a55d0e0f1416b634d6464f925 /src/logic/linkcmd
parenta6c3935a905e27e38e63d0d77578c158c873ad08 (diff)
downloadslibtool-816e2809f45c52162aa68281f61450cfbb38d8d0.tar.bz2
slibtool-816e2809f45c52162aa68281f61450cfbb38d8d0.tar.xz
link mode: support the darwin version for the -no-undefined switch.
Diffstat (limited to 'src/logic/linkcmd')
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_dsolib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_dsolib.c b/src/logic/linkcmd/slbt_linkcmd_dsolib.c
index c395118..a3361db 100644
--- a/src/logic/linkcmd/slbt_linkcmd_dsolib.c
+++ b/src/logic/linkcmd/slbt_linkcmd_dsolib.c
@@ -105,7 +105,9 @@ int slbt_exec_link_create_library(
/* --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";
/* -soname */
dot = strrchr(dctx->cctx->output,'.');