Skip to content

nss: cross compile support#58063

Merged
matthewbauer merged 2 commits into
NixOS:masterfrom
illegalprime:nss-cross
Jun 11, 2019
Merged

nss: cross compile support#58063
matthewbauer merged 2 commits into
NixOS:masterfrom
illegalprime:nss-cross

Conversation

@illegalprime
Copy link
Copy Markdown
Member

Motivation for this change

nss cross compilation! (important to cross compile NixOS)
at first my solution was really hacky but I got it down to be reasonable again.
should work for aarch64 & armv7l

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Mar 21, 2019
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to use NATIVE_CC, OS_TEST and CPU_ARCH unconditionally, no?
This way we have less code that is only when cross-compiling.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 Jun 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait was this done? Oh as many were moved over as possible?

@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Mar 23, 2019
@Mic92
Copy link
Copy Markdown
Member

Mic92 commented Mar 25, 2019

@GrahamcOfBorg build nss

@illegalprime
Copy link
Copy Markdown
Member Author

i cannot test this on darwin unfortunately :(

@Mic92
Copy link
Copy Markdown
Member

Mic92 commented Mar 26, 2019

This seems like a regression though. The offending line looks like this:

#if defined (__i386__) || defined(__x86_64__)
#include "i386/_types.h"
#else
#error architecture not supported
#endif

I currently blame CPU_ARCH for that. I suppose in that case we should move it back to cross-compiling.

@Mic92
Copy link
Copy Markdown
Member

Mic92 commented Mar 27, 2019

@GrahamcOfBorg build nss

@flokli
Copy link
Copy Markdown
Member

flokli commented May 17, 2019

@GrahamcOfBorg build pkgsCross.aarch64-multiplatform.nss

@matthewbauer matthewbauer merged commit fc04ec9 into NixOS:master Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants