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 compile support doesn't work if host and target compilers are different #130

Open
rossburton opened this issue Jun 12, 2019 · 4 comments

Comments

@rossburton
Copy link

If the native compiler is e.g. gcc 6.3 but the cross compiler is gcc 9, then using the target CFLAGS when building the native makeguids binary could fail if gcc9-specific options were being used.

@rossburton
Copy link
Author

The usual technique is to carry on the FOR_BUILD idiom, and respect CFLAGS_FOR_BUILD etc. Maybe it's time to use something like Meson which does this for you?

@dtor
Copy link
Contributor

dtor commented Aug 6, 2019

I also observe similar breakage with makeguids crashing with invalid opcode because our build scripts compile for particular target architecture which is not supported by the host where makeguids is being executed.

@asheplyakov
Copy link

The problem is that util.o is linked both into makeguids binary (which should run on the build machine) and target libraries/binaries. Depending on luck either the $build util.o gets linked into target libraries/binaries, or the target util.o is linked into makeguids.

@asheplyakov
Copy link

The problem is that util.o is linked both into makeguids binary (which should run on the build machine) and target libraries/binaries. Depending on luck either the $build util.o gets linked into target libraries/binaries, or the target util.o is linked into makeguids.

This has been solved by ca48d39

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

3 participants