diff options
author | midipix <writeonce@midipix.org> | 2025-05-03 20:57:58 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-05-03 20:57:58 +0000 |
commit | 9f8c4306bb931a0037f48f235c985d403bb8263d (patch) | |
tree | cb1a84946486046a3e766aef44ecdb0ecf1d6412 /src/internal | |
parent | 51d8f459e74111c81b2d62cf9f581cc7c85ea825 (diff) | |
download | slibtool-9f8c4306bb931a0037f48f235c985d403bb8263d.tar.bz2 slibtool-9f8c4306bb931a0037f48f235c985d403bb8263d.tar.xz |
slbt_get_lconf_flags(): also parse the sltdl preference option.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/slibtool_lconf_impl.c | 15 |
1 files changed, 14 insertions, 1 deletions
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) { |