@@ -337,10 +337,18 @@ rec {
337337 The "gnu" ABI is ambiguous on 32-bit ARM. Use "gnueabi" or "gnueabihf" instead.
338338 '';
339339 }
340+ { assertion = platform: platform.system != "powerpc64-linux";
341+ message = ''
342+ The "gnu" ABI is ambiguous on big-endian 64-bit PPC. Use "elfv1" or "elfv2" instead.
343+ '';
344+ }
340345 ];
341346 };
342347 gnuabi64 = { abi = "64"; };
343348
349+ elfv1 = { abi = "elfv1"; };
350+ elfv2 = { abi = "elfv2"; };
351+
344352 musleabi = { float = "soft"; };
345353 musleabihf = { float = "hard"; };
346354 musl = {};
@@ -444,6 +452,7 @@ rec {
444452 if lib.versionAtLeast (parsed.cpu.version or "0") "6"
445453 then abis.gnueabihf
446454 else abis.gnueabi
455+ else if cpu == "powerpc64" then abis.elfv2
447456 else abis.gnu
448457 else abis.unknown;
449458 };