0008-clang-musl-ppc-does-not-support-128-bit-long-double.patch 1000 B

12345678910111213141516171819202122232425262728293031
  1. From 45ada900078b1a0b8d428766f5f429912e8eb521 Mon Sep 17 00:00:00 2001
  2. From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
  3. Date: Tue, 9 Nov 2021 10:09:14 +0800
  4. Subject: [PATCH 08/34] clang: musl/ppc does not support 128-bit long double
  5. Rebased to LLVM 14.0.0 by Jun Yuan Tan
  6. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  7. Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
  8. ---
  9. clang/lib/Basic/Targets/PPC.h | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h
  12. index 89034682a90e..43d8828dc0ff 100644
  13. --- a/clang/lib/Basic/Targets/PPC.h
  14. +++ b/clang/lib/Basic/Targets/PPC.h
  15. @@ -394,6 +394,10 @@ public:
  16. LongDoubleFormat = &llvm::APFloat::IEEEdouble();
  17. }
  18. + if (getTriple().isMusl()) {
  19. + LongDoubleWidth = LongDoubleAlign = 64;
  20. + LongDoubleFormat = &llvm::APFloat::IEEEdouble();
  21. + }
  22. // PPC32 supports atomics up to 4 bytes.
  23. MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
  24. }
  25. --
  26. 2.33.1