Skip to content

y sets LIBRARY_PATH which confuses gcc when compiling for a different target #638

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

Open
ds84182 opened this issue Feb 26, 2025 · 1 comment

Comments

@ds84182
Copy link

ds84182 commented Feb 26, 2025

env.insert("LIBRARY_PATH".to_string(), gcc_path);

Linkers (both rust-lld and ld) attempt to link against the built GCC's crtbegin.o, which may not match the host architecture. Locally I've solved this by commenting out the LIBRARY_PATH environment variable then specifying RUSTFLAGS="-Lgcc-install/lib" to link against libgccjit.

@antoyo
Copy link
Contributor

antoyo commented Apr 11, 2025

Sorry I forgot about this.

Could you please explain what you're trying to achieve?

Linkers (both rust-lld and ld) attempt to link against the built GCC's crtbegin.o, which may not match the host architecture.

I'm not sure I understand: don't you want to build with the cross-compiled crtbegin.o if you're cross-compiling?

Edit: Can you please post steps to reproduce this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants