mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
gcc: only pass --with-long-double-format if gcc allows it
This commit is contained in:
parent
29b395309f
commit
deda18bae8
@ -14,7 +14,14 @@ in lib.concatLists [
|
||||
(lib.optionals targetPlatform.isPower64
|
||||
# musl explicitly rejects 128-bit long double on
|
||||
# powerpc64; see musl/arch/powerpc64/bits/float.h
|
||||
(lib.optionals (!targetPlatform.isMusl) [
|
||||
(lib.optionals
|
||||
(!targetPlatform.isMusl
|
||||
&& (targetPlatform.isLittleEndian ||
|
||||
# "... --with-long-double-format is only supported if the default cpu is power7 or newer"
|
||||
# https://github.com/NixOS/nixpkgs/pull/170215#issuecomment-1202164709
|
||||
(lib.lists.elem
|
||||
(lib.strings.substring 0 6 (p.cpu or ""))
|
||||
[ "power7" "power8" "power9" "power1"/*0, 11, etc*/ ]))) [
|
||||
"--with-long-double-128"
|
||||
"--with-long-double-format=${gcc.long-double-format or "ieee"}"
|
||||
]))
|
||||
|
Loading…
Reference in New Issue
Block a user