The "compiler.links()" function meson documentation [1] is a little unclear, in a casual reading implies that the function was new in 0.60 meson release. In fact, it is only enhanced as described in that release, but is present earlier. As such, we can remove the version checks preceeding the calls to links function in our code.
[1] https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerlinks Fixes: fd809737cf8c ("common/qat: fix build with incompatible IPsec library") Fixes: fb94d8243894 ("crypto/ipsec_mb: add dependency check for cross build") Cc: sta...@dpdk.org Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> --- drivers/common/qat/meson.build | 2 +- drivers/crypto/ipsec_mb/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index 3893b127dd..5a8de16fe0 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -43,7 +43,7 @@ else IMB_required_ver = '1.4.0' IMB_header = '#include<intel-ipsec-mb.h>' libipsecmb = cc.find_library('IPSec_MB', required: false) - if libipsecmb.found() and meson.version().version_compare('>=0.60') and cc.links( + if libipsecmb.found() and cc.links( 'int main(void) {return 0;}', dependencies: libipsecmb) # version comes with quotes, so we split based on " and take the middle imb_ver = cc.get_define('IMB_VERSION_STR', diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index 87bf965554..81631d3050 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -17,7 +17,7 @@ if not lib.found() build = false reason = 'missing dependency, "libIPSec_MB"' # if the lib is found, check it's the right format -elif meson.version().version_compare('>=0.60') and not cc.links( +elif not cc.links( 'int main(void) {return 0;}', dependencies: lib) build = false reason = 'incompatible dependency, "libIPSec_MB"' -- 2.43.0