[PATCH] D118110: [CMake] [Clang] Add CMake build option to specify long double format on PowerPC

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 25 01:22:23 PST 2022


qiucf created this revision.
qiucf added reviewers: jsji, nemanjai, shchenz, PowerPC.
Herald added subscribers: steven.zhang, kbarton, mgorny.
qiucf requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This method introduces new CMake variable `ENABLE_PPC_IEEELONGDOUBLE` (false by default) to enable `fp128` as default long double format.

We need to make some tests explicitly set long double type, otherwise they fail in either config.

There's one thing uncertain: whether this config only applies to `ppc64le`? Currently `-mabi=ieeelongdouble` also works on ppc64 linux, GCC also does under big endian, however we may be not interested in doing the transition other than ppc64le (https://gcc.gnu.org/wiki/Ieee128PowerPC#A7.0_Transition_to_IEEE_128-bit_floating_point_as_the_default_for_long_double ).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118110

Files:
  clang/CMakeLists.txt
  clang/include/clang/Config/config.h.cmake
  clang/include/clang/Driver/ToolChain.h
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Analysis/builtin_signbit.cpp
  clang/test/Driver/ppc-abi.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118110.402789.patch
Type: text/x-patch
Size: 4254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220125/9506b517/attachment.bin>


More information about the cfe-commits mailing list