Skip to content

cargo-optee: set CROSS_COMPILE for TA build commands - #324

Merged
ivila merged 1 commit into
apache:mainfrom
ivila:fix/cargo-optee-cross-compile
Sep 18, 2026
Merged

ivila merged 1 commit into
apache:mainfrom
ivila:fix/cargo-optee-cross-compile

Conversation

@ivila

@ivila ivila commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Dependencies with cc build scripts pick the cross compiler from CROSS_COMPILE. The custom OP-TEE targets are absent from cc's builtin table, so without it C code is silently compiled for the host and the final link fails (e.g. secp256k1-sys objects built as x86-64).

Previously unnoticed because default examples carry no cc-based C dependencies, eth_wallet (the only in-repo cc user) is built via legacy make rather than this tool, and dev shells exporting CROSS_COMPILE per OP-TEE docs masked it locally.

Dependencies with cc build scripts pick the cross compiler from
CROSS_COMPILE. The custom OP-TEE targets are absent from cc's builtin
table, so without it C code is silently compiled for the host and the
final link fails (e.g. secp256k1-sys objects built as x86-64).

Previously unnoticed because default examples carry no cc-based C
dependencies, eth_wallet (the only in-repo cc user) is built via
legacy make rather than this tool, and dev shells exporting
CROSS_COMPILE per OP-TEE docs masked it locally.
@ivila ivila added the bug Something isn't working label Sep 18, 2026
@ivila
ivila merged commit 448a96d into apache:main Sep 18, 2026
18 checks passed
@ivila
ivila deleted the fix/cargo-optee-cross-compile branch September 21, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant