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 <bo.sun.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Bo Sun 2025-07-24 15:55:00 +08:00 committed by Khem Raj
parent f4b5d7aad7
commit 7e3b4725c9
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -22,7 +22,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