Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compilation assistance: Set the CXX_* and AR_* environment variables too #725

Open
edmorley opened this issue Nov 9, 2023 · 0 comments
Labels
enhancement New feature or request libcnb-package

Comments

@edmorley
Copy link
Member

edmorley commented Nov 9, 2023

The cross compile toolchain docs at https://github.com/messense/homebrew-macos-cross-toolchains suggest setting all three of these env vars (adjusted appropriately for the name of the target):

CC_x86_64_unknown_linux_gnu=x86_64-linux-gnu-gcc
CXX_x86_64_unknown_linux_gnu=x86_64-linux-gnu-g++
AR_x86_64_unknown_linux_gnu=x86_64-linux-gnu-ar

However, currently we're only setting the CC_* variant, not the CXX_* and AR_* env vars.

Whilst this works for all of the Rust crates we happen to use so far, for completeness we should probably set them all, in case someone uses a crate that relies on a tool that needs them to be set.

See:
https://github.com/heroku/libcnb.rs/blob/main/libcnb-package/src/cross_compile.rs

@edmorley edmorley added enhancement New feature or request libcnb-package labels Nov 9, 2023
@edmorley edmorley changed the title Cross-compilation assistence: Set the CXX_* and AR_* environment variables too Cross-compilation assistance: Set the CXX_* and AR_* environment variables too Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request libcnb-package
Projects
None yet
Development

No branches or pull requests

1 participant