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
Conversation
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"; }; |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; }; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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") | |||
|
There was a problem hiding this comment.
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.
pkgs/stdenv/generic/default.nix
Outdated
@@ -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; |
There was a problem hiding this comment.
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
#45340 is now merged. We should see what is left here that isn't included in that. |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)