thin-provisioning-tools: fix bindgen build error with clang on octeontx2
PATCH 1/1 thin-provisioning-tools: fix bindgen build error with clang on octeontx2
Remove unsupported '-mcpu=octeontx2+crypto' from BINDGEN_EXTRA_CLANG_ARGS as clang does not recognize 'octeontx2' as a valid target CPU, causing bindgen to fail when generating Rust bindings.
Since bindgen only parses headers using Clang, CPU-specific options like -mcpu are generally unnecessary.
Fixes build failure:
| error: unsupported argument 'octeontx2+crypto' to option '-mcpu=' | error: unknown target CPU 'octeontx2'
Signed-off-by Bo Sun <[email protected]>
--- .../thin-provisioning-tools/thin-provisioning-tools_1.1.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/dynamic-layers/clang-layer/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.1.0.bb +4 -1
@@ -23,7 +23,10 @@ inherit pkgconfig DEPENDS += "udev libdevmapper libdevmapper-native clang-native" export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}" -export BINDGEN_EXTRA_CLANG_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} --target=${TARGET_SYS}" +# Remove octeontx2 specific CPU flags that may cause issues with bindgen +BINDGEN_EXTRA_CLANG_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} --target=${TARGET_SYS}" +BINDGEN_EXTRA_CLANG_ARGS:remove = "-mcpu=octeontx2+crypto" +export BINDGEN_EXTRA_CLANG_ARGS require ${BPN}-crates.inc require ${BPN}-git-crates.inc
Signature · 1 line
2.50.1