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

12345678910111213141516171819202122232425262728293031
  1. From 5e60a031126fa4adbe67976b26d3ab8712d080df Mon Sep 17 00:00:00 2001
  2. From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
  3. Date: Fri, 22 Oct 2021 11:28:21 +0800
  4. Subject: [PATCH] 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 f19d3ebbc066..97861fb0b78d 100644
  13. --- a/clang/lib/Basic/Targets/PPC.h
  14. +++ b/clang/lib/Basic/Targets/PPC.h
  15. @@ -395,6 +395,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.0