[gcc(refs/users/meissner/heads/pr97543)] Undo patches.

Michael Meissner meissner@gcc.gnu.org
Tue Oct 27 13:41:05 GMT 2020


https://gcc.gnu.org/g:05fc684a5df72db27861e715c5715f5af8d083f9

commit 05fc684a5df72db27861e715c5715f5af8d083f9
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Tue Oct 27 09:40:05 2020 -0400

    Undo patches.
    
    gcc/
    2020-10-27  Michael Meissner  <meissner@linux.ibm.com>
    
            Undo:
            PR libgcc/97543
            * config/rs6000/t-linux (HOST_LIBGCC2_CFLAGS): Don't set
            -mlong-double-128 for all modules.  Instead set
            -mno-gnu-attributes.
            (IBM128_OBJS): New make variable for long double support.
            (IBM128_S_OBJS): New make variable for long double support.
            (IBM128_ALL_OBJS): New make variable for long double support.
            (IBM128_CFLAGS): New make variable for long double support.
    
    libgcc/
    2020-10-27  Michael Meissner  <meissner@linux.ibm.com>
    
            Undo:
            PR libgcc/97543
            * config.gcc (powerpc*-*-*, rs6000*-*-*): Add support for new
            methods to set the long double size and format.
            * config/rs6000/linux.h (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Don't
            set if it was already defined.
            * config/rs6000/linux64.h (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Don't
            set if it was already defined.
            * doc/invoke.texi (--with-long-double-128ieee): Document.
            (--with-long-double-128ibm): Document.
            (--with-long-double-format): Document that you can't set long
            double size to 64, and set the format to ibm/ieee.

Diff:
---
 gcc/config.gcc               | 46 +++++++-------------------------------------
 gcc/config/rs6000/linux.h    |  3 +--
 gcc/config/rs6000/linux64.h  |  3 +--
 gcc/doc/install.texi         | 24 ++++-------------------
 libgcc/config/rs6000/t-linux | 18 +----------------
 5 files changed, 14 insertions(+), 80 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 8d9ea345ff3..411200dff91 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5024,45 +5024,13 @@ case "${target}" in
 		    fi
 		fi
 
-		# Allow the user to override the long double size and if the
-		# size is 128-bits, the user can select the format (IBM or
-		# IEEE).  We provide extensions to --with-long-double=size
-		# (128ieee and 128ibm) to allow a single switch to control both
-		# the long double size and format.
-		case "${with_long_double}:${with_long_double_format}" in
-		    :)
-			;;
-		    64:)
-			tm_defines="${tm_defines} RS6000_DEFAULT_LONG_DOUBLE_SIZE=64"
-			;;
-		    128:)
-			tm_defines="${tm_defines} RS6000_DEFAULT_LONG_DOUBLE_SIZE=128"
-			;;
-		    128:ieee | 128ieee: | 128ieee:ieee | ieee: | ieee:ieee | :ieee)
-			tm_defines="${tm_defines} RS6000_DEFAULT_LONG_DOUBLE_SIZE=128"
-			tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
-			;;
-		    128:ibm | 128ibm: | 128ibm:ibm | ibm: | ibm:ibm | :ibm)
-			tm_defines="${tm_defines} RS6000_DEFAULT_LONG_DOUBLE_SIZE=128"
-			tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
-			;;
-		    *:)
-			echo "Unknown --with-long-double option: " \
-			     "${with_long_double}"
-			exit 1
-			;;
-		    :*)
-			echo "Unknown --with-long-double-format option: " \
-			     "${with_long_double_format}"
-			exit 1
-			;;
-		    *)
-			echo "Unsupported combination: " \
-			     "--with-long-double=${with_long_double} and " \
-			     "--with-long-double-format=${with_long_double_format}"
-			exit 1
-			;;
-		esac
+		# Set up the default long double format if the user changed it.
+		if test x$with_long_double_format = xieee; then
+		    tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
+
+		elif test x$with_long_double_format = xibm; then
+		    tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
+		fi
 		;;
 
 	s390*-*-*)
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 6e87167f504..b7026fcbee7 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -126,8 +126,7 @@
 #define POWERPC_LINUX
 
 /* ppc linux has 128-bit long double support in glibc 2.4 and later.  */
-#if defined(TARGET_DEFAULT_LONG_DOUBLE_128) \
-    && !defined(RS6000_DEFAULT_LONG_DOUBLE_SIZE)
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
 #endif
 
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 358d60404a6..73b6c01874c 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -529,8 +529,7 @@ extern int dot_symbols;
 #define POWERPC_LINUX
 
 /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later.  */
-#if defined(TARGET_DEFAULT_LONG_DOUBLE_128) \
-    && !defined(RS6000_DEFAULT_LONG_DOUBLE_SIZE)
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
 #endif
 
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index e757b72a017..5330bf3bb29 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1986,21 +1986,6 @@ When neither of these configure options are used, the default will be
 128-bit @code{long double} when built against GNU C Library 2.4 and later,
 64-bit @code{long double} otherwise.
 
-@item --with-long-double-128ieee
-On PowerPC, specify that the @code{long double} type should be 128
-bits and it should be use the IEEE 128-bit representation.  The GNU C
-Library 2.32 and supports IEEE 128-bit floating point format.  If you
-use the @option{--with-long-double-128ieee} option, you cannot use the
-@option{--with-long-double=64} option.
-
-@item --with-long-double-128ibm
-On PowerPC, specify that the @code{long double} type should be 128
-bits and it should be use the IBM extended double representation.  The
-GNU C Library 2.4 and later and supports IBM extended double 128-bit
-floating point format.  If you use the
-@option{--with-long-double-128ibm} option, you cannot use the
-@option{--with-long-double=64} option.
-
 @item --with-long-double-format=ibm
 @itemx --with-long-double-format=ieee
 Specify whether @code{long double} uses the IBM extended double format
@@ -2010,15 +1995,14 @@ Linux systems and on big endian 64-bit systems where the default cpu
 is at least power7 (i.e.@: @option{--with-cpu=power7},
 @option{--with-cpu=power8}, or @option{--with-cpu=power9} is used).
 
-You cannot use the @option{--with-long-double-64} configuration
-option, with either the @option{--with-long-double-format=ibm} or
-@option{--with-long-double-format=ieee} options.
+If you use the @option{--with-long-double-64} configuration option,
+the @option{--with-long-double-format=ibm} and
+@option{--with-long-double-format=ieee} options are ignored.
 
 The default @code{long double} format is to use IBM extended double.
 Until all of the libraries are converted to use IEEE 128-bit floating
 point, it is not recommended to use
-@option{--with-long-double-format=ieee} or
-@option{--with-long-double=128ieee}.
+@option{--with-long-double-format=ieee}.
 
 On little endian PowerPC Linux systems, if you explicitly set the
 @code{long double} type, it will build multilibs to allow you to
diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
index b2a079c6b54..ed821947b66 100644
--- a/libgcc/config/rs6000/t-linux
+++ b/libgcc/config/rs6000/t-linux
@@ -1,22 +1,6 @@
 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
 
-# On the modules that deal with IBM 128-bit values, we need to make sure that
-# TFmode uses the IBM extended double format.
-IBM128_OBJS	= ibm-ldouble$(objext) _powitf2$(objext) ppc64-fp$(objext) \
-		  _divtc3$(object) _multc3$(object) \
-		  _fixtfdi$(object) _fixunstfdi$(object) \
-		  _floatditf$(objext) _floatunsditf$(objext)
-
-IBM128_S_OBJS	= $(patsubst %$(objext),%_s$(objext),$(IBM128_OBJS))
-IBM128_ALL_OBJS	= $(IBM128_OBJS) $(IBM128_S_OBJS)
-
-IBM128_CFLAGS	= -mlong-double-128 -Wno-psabi -mabi=ibmlongdouble
-
-$(IBM128_ALL_OBJS) : INTERNAL_CFLAGS += $(IBM128_CFLAGS)
-
-# Turn off gnu attributes for the whole library.  This allows us to build
-# libgcc that supports the different long double formats.
-HOST_LIBGCC2_CFLAGS += -mno-gnu-attribute
+HOST_LIBGCC2_CFLAGS += -mlong-double-128
 
 # This is a way of selecting -mcmodel=small for ppc64, which gives
 # smaller and faster libgcc code.  Directly specifying -mcmodel=small


More information about the Gcc-cvs mailing list