Skip to content

Ensure that cross compiler info is passed to GYP correctly #17449

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

Closed
wants to merge 2 commits into from
Closed

Ensure that cross compiler info is passed to GYP correctly #17449

wants to merge 2 commits into from

Conversation

mcoffin
Copy link
Contributor

@mcoffin mcoffin commented Sep 22, 2014

Right now, libuv will always be built for the host system (at least when building on OSX) because the information about the cross compiler is never actually passed to GYP. I don't know how anybody has been managing to build cross compilers with this.

Note that, at least on OSX, there is a bug in GYP that will send clang flags to non-clang compilers and it will still attempt to use Xcode's libtool, so this doesn't completely fix the problem of cross-compiling on an OSX host, but it's a start.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

@mcoffin
Copy link
Contributor Author

mcoffin commented Sep 22, 2014

On second thought, it might be easier to switch over to using the autotools build system with something like this:
$(S)src/libuv/configure --disable-shared --enable-static --host=$(1) --disable-dtrace

Thoughts?

@alexcrichton
Copy link
Member

We currently don't want to pick up a dependency on autotools, and libuv doesn't check in the configure script by default.

I'm curious, but what makes you think that libuv is always build for the host architecture? We have a number of cross-compiling bots which cross architectures quite frequently (even to android!). Is that because we "cross compile" with -m32 and -m64?

@mcoffin
Copy link
Contributor Author

mcoffin commented Sep 22, 2014

Well, when I did configure with --target=arm-unknown-linux-gnueabi, then run a make, in the $BUILD_DIR/arm-unknown-linux-gnueabi/rt/libuv folder, in libuv.target.mk, CC.target = clang and CXX.target = clang++. After this edit, it correctly sets CC.target and CXX.target without harming CC.host and CXX.host.

EDIT: My host system is OSX, hence clang on the host, but my arm-linux-gnueabi toolchain is GNU.

@alexcrichton
Copy link
Member

Ah interesting! Sounds good to me then, thanks!

bors added a commit that referenced this pull request Sep 24, 2014
Right now, libuv will **always** be built for the host system (at least when building on OSX) because the information about the cross compiler is never actually passed to GYP. I don't know how anybody has been managing to build cross compilers with this.

Note that, at least on OSX, there is a bug in GYP that will send clang flags to non-clang compilers and it will still attempt to use Xcode's libtool, so this doesn't completely fix the problem of cross-compiling on an OSX host, but it's a start.
@bors bors closed this Sep 24, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 23, 2024
Term search: new tactic for associated item constants

New tactic to cover some more exotic cases that started bothering me.

Associated constants seem to be common in [axum](https://github.com/tokio-rs/axum/blob/806bc26e62afc2e0c83240a9e85c14c96bc2ceb3/examples/readme/src/main.rs#L53).
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

Successfully merging this pull request may close these issues.

4 participants