public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work077)] Use system default for long double unless it is overridden.
@ 2022-02-03  0:56 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2022-02-03  0:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e0cda1de4b0c4227df0055b3ba130d7b78aeb4d9

commit e0cda1de4b0c4227df0055b3ba130d7b78aeb4d9
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Feb 2 19:54:39 2022 -0500

    Use system default for long double unless it is overridden.
    
    If the user did not specify a default long double format when configuring
    GCC, use the long double default for the host compiler.
    
    2022-02-02  Michael Meissner  <meissner@the-meissners.org>
    
    gcc/
            * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the
            host compiler defaults to IEEE 128-bit long double, make that the
            default for this build.

Diff:
---
 gcc/config/rs6000/rs6000.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 666dec694a8..0595855568c 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -91,10 +91,17 @@
      explicitly redefine TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so
      those systems will not pick up this default.  This needs to be after all
      of the include files, so that POWERPC_LINUX and POWERPC_FREEBSD are
-     properly defined.  */
+     properly defined.  In addition, the --with-long-double-format
+     configuration option also sets TARGET_IEEEQUAD_DEFAULT.
+
+     If the host compiler uses IEEE 128-bit long doubles, make the default to
+     also use IEEE 128-bit long doubles unless the --with-long-double-format
+     configuration switch was used.  */
 #ifndef TARGET_IEEEQUAD_DEFAULT
 #if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
 #define TARGET_IEEEQUAD_DEFAULT 1
+#elif defined (__LONG_DOUBLE_IEEE128__)
+#define TARGET_IEEEQUAD_DEFAULT 1
 #else
 #define TARGET_IEEEQUAD_DEFAULT 0
 #endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-03  0:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  0:56 [gcc(refs/users/meissner/heads/work077)] Use system default for long double unless it is overridden Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).