From 9f8c4306bb931a0037f48f235c985d403bb8263d Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 3 May 2025 20:57:58 +0000 Subject: slbt_get_lconf_flags(): also parse the sltdl preference option. --- src/internal/slibtool_lconf_impl.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index 1b48c76..ad08498 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -766,6 +766,7 @@ slbt_hidden int slbt_get_lconf_flags( void * addr; uint64_t optshared; uint64_t optstatic; + uint64_t optsltdl; char val[PATH_MAX]; /* driver context (ar, ranlib, cc) */ @@ -830,8 +831,20 @@ slbt_hidden int slbt_get_lconf_flags( return SLBT_CUSTOM_ERROR( dctx,SLBT_ERR_LCONF_PARSE); - *flags = optshared | optstatic; + /* sltdl option */ + if (slbt_get_lconf_var(confctx,"prefer_sltdl=",0,&val) < 0) { + return SLBT_CUSTOM_ERROR( + dctx,SLBT_ERR_LCONF_PARSE); + + } else if (!strcmp(val,"yes")) { + optsltdl = SLBT_DRIVER_PREFER_SLTDL; + + } else { + optsltdl = 0; + } + /* return flags */ + *flags = optshared | optstatic | optsltdl; /* host */ if (!ctx->cctx.host.host) { -- cgit v1.2.3