Skip to content

Commit

Permalink
crypto/ipsec_mb: add dependency check for cross build
Browse files Browse the repository at this point in the history
When cross-compiling for PowerPC on Ubuntu, the x86 IPSec_MB library was
getting found by the build system for use in the PPC build. This led to
failures at compile time due to the library not being linkable.

We can avoid these failures by checking the discovered library for
compatibility at configuration time. This needs a version check as it is
supported only from version 0.60 of meson onwards.

Fixes: c75542a ("crypto/ipsec_mb: introduce IPsec_mb framework")
Cc: [email protected]

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Ciara Power <[email protected]>
  • Loading branch information
bruce-richardson authored and tmonjalo committed Oct 11, 2023
1 parent b037cef commit fb94d82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/crypto/ipsec_mb/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ lib = cc.find_library('IPSec_MB', required: false)
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(
'int main(void) {return 0;}', dependencies: lib)
build = false
reason = 'incompatible dependency, "libIPSec_MB"'
else
ext_deps += lib

Expand Down

0 comments on commit fb94d82

Please sign in to comment.