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
Set CMAKE_SYSTEM_* for cross compiling #48602
Conversation
Uses uname data to find what to set these variables: - CMAKE_SYSTEM_NAME - CMAKE_SYSTEM_PROCESSOR - CMAKE_SYSTEM_VERSION - CMAKE_HOST_SYSTEM_NAME - CMAKE_HOST_SYSTEM_PROCESSOR - CMAKE_HOST_SYSTEM_VERSION
the boost url is broken - remove for now
this makes it easier to show what supports windows vs. unix.
"platforms.all" could include any possible os (even a machine with no OS at all!). We can’t possible hope to support all of that, so need to be more specific.
Success on aarch64-linux (full log) Attempted: boost, sqlite Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: boost, sqlite Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: boost, sqlite Partial log (click to expand)
|
@GrahamcOfBorg build pkgs.pkgsCross.mingwW64.brotli |
Success on aarch64-linux (full log) Attempted: pkgs.pkgsCross.mingwW64.brotli Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: pkgs.pkgsCross.mingwW64.brotli Partial log (click to expand)
|
avoid mass rebuild from the last commits
@Ericson2314 This avoids having to create a wrapper for Cmake and should work just as good... Does it look right to you? |
Success on aarch64-linux (full log) Attempted: boost, sqlite Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: boost, sqlite Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: pkgs.pkgsCross.mingwW64.brotli Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: boost, sqlite Partial log (click to expand)
|
configure spits out an error when running on windows
only static will build for me
Failure on aarch64-linux (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
@GrahamcOfBorg build pkgsCross.mingwW64.nix |
Success on aarch64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
mingw is the toolchain name but it is actually run on a window kernel
Failure on x86_64-linux (full log) Attempted: pkgsCross.mingwW64.nix Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Awesome!! Small nit, the "doubles" changes can be tested in I was about to mention CC @aneeshusa, let's use your nix-level hook for this next! (And also merge your cmake changes that use it :) ) |
these weren’t being run correctly
Success on aarch64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Oh, even more awesome. Thanks @matthewbauer! |
Success on x86_64-darwin (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib Partial log (click to expand)
|
Set CMAKE_SYSTEM_* for cross compiling
Motivation for this change
This sets some new variables in make-derivation for cross compiling with CMAKE. Here is the list:
To do this, we need to start keeping track of uname values, respectively:
We don't really have a way to get the last one, so leave it null for now.
Also remove some old hacks setting CMAKE_SYSTEM_NAME ad-hoc. And also add some windows doubles (were strangely missing).