meta-rust-bin icon indicating copy to clipboard operation
meta-rust-bin copied to clipboard

Fix cc wrappers (revert #197)

Open fbeutel opened this issue 9 months ago • 0 comments

If I'm not mistaken, the changes made in pull request #197 break some rust build scripts.

The behavior as it originally was should have been correct, as it defines

CC="${WRAPPER_DIR}/cc-native-wrapper.sh"    # this is used when building on the host, as long as `HOST_CC` is not defined, and therefore it should point to cc-native-wrapper.sh
TARGET_CC="${WRAPPER_DIR}/cc-wrapper.sh"

According to the cc docs, TARGET_CC takes precedence over CC when cross-compiling to the target, and otherwise CC is being used.

In addition, the original pull request defined the variable BUILD_CC, but that is meaningless for the cc crate (Yocto defines such a variable, but cc only looks for HOST_CC and CC when compiling for the host).

I think this should also fix #204

I'm not sure what the original problem was which pull request #197 tried to solve, but maybe there was just no adequate gcc installed on the host system?

fbeutel avatar May 08 '25 10:05 fbeutel