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

POWER9 architecture support : Add initial support to create a powerpc64le boostrap #44092

Closed
wants to merge 1 commit into from

Conversation

adevress
Copy link
Contributor

@adevress adevress commented Jul 25, 2018

  • ppc64le is the architecture used for POWER8 / POWER9 machines
  • ppc64le implies a bit of trickery for long long double being 128bits
Motivation for this change
  • Initial request to add POWER9 architecture support
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)
  • Fits CONTRIBUTING.md.

@adevress adevress changed the title Add initial support to create a powerpc64le boostrap POWER9 architecture support : Add initial support to create a powerpc64le boostrap Jul 25, 2018
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

A few things to do, but very excited people are adding more platforms!

@@ -29,6 +29,13 @@ rec {
platform = platforms.aarch64-multiplatform;
};

powerpc64le-multiplatform = rec {
config = "powerpc64le-unknown-linux-gnu";
arch = "ppc64le";
Copy link
Member

Choose a reason for hiding this comment

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

What is this? I removed arch from these a few months ago. You mean the GCC or Linux Arch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I started to do this support on a nixpkgs of some month ago... let me remove that

@@ -89,7 +89,7 @@ rec {
mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; };

powerpc = { bits = 32; significantByte = bigEndian; family = "power"; };

powerpc64le = { bits = 64; significantByte = littleEndian; family = "power"; };
Copy link
Member

Choose a reason for hiding this comment

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

I like speculatively including everything to illustrate the symmetries. Can you include powerpc64 and powerpcle (or whatever vthey are called)?

Copy link
Contributor Author

@adevress adevress Jul 25, 2018

Choose a reason for hiding this comment

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

No

  • powerpc64 is a different architecture ( POWER <= 7 ) that I do not own any hardware for, and will very likely disappear in future.
  • powerpcle does not exist I think.

powerpc64le is the usual code name used by distribution for OpenPOWER power8/9 generation. meaning PowerPC architecture, 64 bits, little endian.

Copy link
Member

Choose a reason for hiding this comment

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

hehe then http://llvm.org/doxygen/Triple_8cpp_source.html is inconsistent (see the get*Variant functions).

@@ -11,6 +11,7 @@ rec {
isi686 = { cpu = cpuTypes.i686; };
isx86_64 = { cpu = cpuTypes.x86_64; };
isPowerPC = { cpu = cpuTypes.powerpc; };
isppc64le = { cpu = cpuTypes.powerpc64le; };
Copy link
Member

Choose a reason for hiding this comment

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

Hmm since this shorthand exists just at the nix level (in this PR) at least, can you capitalize it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is already an Acronym, that's why I did not capitalize it. What would be your prefered way, I really do not care about changing it

] else [
] ++ stdenv.lib.optionals ( targetPlatform.config == "powerpc64le-unknown-linux-gnu" ) [
"--with-long-double-128"
"--enable-softfloat"
Copy link
Member

Choose a reason for hiding this comment

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

See what I did with the ABIs in the nixpkgs lib to lessen the cominatorial explosion in GCC. Can you use the existing functionality for soft floats, and make a new one for longer floats?

@@ -59,6 +59,10 @@ stdenv.mkDerivation rec {
];
preConfigure = ''
configureFlagsArray+=("--syslibdir=$out/lib")

Copy link
Member

Choose a reason for hiding this comment

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

Please make this conditional on the nix level to avoid rebuilds and be easier to read. Also use += in bash.

@@ -122,7 +122,7 @@ let
# Utility flags to test the type of platform.
inherit (hostPlatform)
isDarwin isLinux isSunOS isHurd isCygwin isFreeBSD isOpenBSD
isi686 isx86_64 is64bit isAarch32 isAarch64 isMips isBigEndian;
isi686 isx86_64 is64bit isArm isAarch64 isMips isBigEndian isppc64le;
Copy link
Member

Choose a reason for hiding this comment

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

Looks like an isArm snuck back in there? Please switch back to isAarch32.

- ppc64le is the architecture used for POWER8 / POWER9 machines
- ppc64le implies a bit of trickery for long long double being 128bits
@Ericson2314
Copy link
Member

#45340 is now merged. We should see what is left here that isn't included in that.

@adevress adevress closed this Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants