[flang-commits] [flang] [flang][doc] Added information about `REAL(16)` math intrinsics support. (PR #87710)

Pete Steinfeld via flang-commits flang-commits at lists.llvm.org
Fri Apr 5 09:35:05 PDT 2024


================
@@ -0,0 +1,38 @@
+<!--===- docs/Real16MathSupport.md
+
+   Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+   See https://llvm.org/LICENSE.txt for license information.
+   SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+-->
+
+# Flang support for REAL(16) math intrinsics
+
+To support most `REAL(16)` (i.e. 128-bit float) math intrinsics Flang relies
+on third-party libraries providing the implementation.
+
+`-DFLANG_RUNTIME_F128_MATH_LIB=libquadmath` CMake option can be used
+to build `FortranFloat128Math` library that has unresolved references
+to GCC `libquadmath` library. Flang driver built with this option
+will automatically link `FortranFloat128Math` and `libquadmath` libraries
+to any Fortran program. This implies that `libquadmath` library
+has to be available in the standard library paths, so that linker
+can find it. The `libquadmath` library installation into Flang project
+distribution is not automatic in CMake currently.
+
+Testing shows that `libquadmath` versions before GCC-9.3.0 have
+accuracy issues, so it is recommended to distribute the Flang
+package with later versions of `libquadmath`.
+
+Care must be taken by the distributors of Flang package built
+with `REAL(16)` support via `libquadmath` because of its licensing
+under GNU Library General Public License. Moreover, static linking
----------------
psteinfeld wrote:

This should read "the GNU" rather than "GNU".

https://github.com/llvm/llvm-project/pull/87710


More information about the flang-commits mailing list