On Wed, Jun 20, 2018 at 07:31:31PM -0500, Segher Boessenkool wrote: > On Wed, Jun 20, 2018 at 10:25:36AM -0400, Michael Meissner wrote: > > This code disables the automatic multilib creation unless you use the > > --with-advance-toolchain=<xxx> option and the Advance Toolchain directoy has > > been modified to have the lib64/ieee128 and/or lib64/ibm128 directories for > > multilib support. This allows the multilib to still be created, but it is > > not > > enabled by default. > > > > Alternatively, I have a patch that disables the IEEE/IBM long double > > multilib > > support completely. > > So what are the advantages and the disadvantages of both approaches? > And, why do you think this one is preferable?
The main advantge is that it makes it a little easier for me to test things, since I only have to build one compiler instead of two. But that is fairly minor. Here is the alternate patch to eliminate the multilib support for IEEE/IBM long double. [gcc] 2018-06-21 Michael Meissner <meiss...@linux.ibm.com> * config.gcc (powerpc64le*): Remove multilib support for IEEE and IBM long double. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise. * config/rs6000/t-ldouble-linux64le-ibm: Delete, IEEE/IBM long double multilib no longer supported. * config/rs6000/t-ldouble-linux64le-ieee: Likewise. * doc/install.texi (PowerPC options): Delete information about IEEE/IBM long double multilibs. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797
Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 261755) +++ gcc/config.gcc (working copy) @@ -4566,16 +4566,6 @@ case "${target}" in elif test x$with_long_double_format = xibm; then tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0" fi - - case "${target}:${enable_multilib}:${with_long_double_format}" in - powerpc64le*:yes:ieee | powerpc64le*:yes:ibm) - tm_defines="${tm_defines} TARGET_IEEEQUAD_MULTILIB=1" - tmake_file="${tmake_file} rs6000/t-ldouble-linux64le-${with_long_double_format}" - ;; - *) - : - ;; - esac ;; s390*-*-*) Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 261755) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -4578,19 +4578,16 @@ rs6000_option_override_internal (bool gl else if (rs6000_long_double_type_size == 128) rs6000_long_double_type_size = FLOAT_PRECISION_TFmode; - /* Set -mabi=ieeelongdouble on some old targets. In the future, power server - systems will also set long double to be IEEE 128-bit. AIX and Darwin - explicitly redefine TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so - those systems will not pick up this default. Warn if the user changes the - default unless either the user used the -Wno-psabi option, or the compiler - was built to enable multilibs to switch between the two long double - types. */ + /* Set -mabi=ieeelongdouble on some old targets. Power server systems may + also set long double to be IEEE 128-bit using the configuration option + --with-long-double-forrmat=ieee. AIX and Darwin explicitly redefine + TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so those systems will + not pick up this default. Warn if the user changes the default unless + either the user used the -Wno-psabi option. */ if (!global_options_set.x_rs6000_ieeequad) rs6000_ieeequad = TARGET_IEEEQUAD_DEFAULT; - else if (!TARGET_IEEEQUAD_MULTILIB - && rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT - && TARGET_LONG_DOUBLE_128) + else if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128) { static bool warned_change_long_double; if (!warned_change_long_double) Index: gcc/config/rs6000/rs6000.h =================================================================== --- gcc/config/rs6000/rs6000.h (revision 261755) +++ gcc/config/rs6000/rs6000.h (working copy) @@ -551,12 +551,6 @@ extern int rs6000_vector_align[]; #define TARGET_ALTIVEC_ABI rs6000_altivec_abi #define TARGET_LDBRX (TARGET_POPCNTD || rs6000_cpu == PROCESSOR_CELL) -/* Define as 1 if we support multilibs for switching long double between IEEE - 128-bit floating point and IBM extended double. */ -#ifndef TARGET_IEEEQUAD_MULTILIB -#define TARGET_IEEEQUAD_MULTILIB 0 -#endif - /* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only. Enable 32-bit fcfid's on any of the switches for newer ISA machines. */ #define TARGET_FCFID (TARGET_POWERPC64 \ Index: gcc/config/rs6000/t-ldouble-linux64le-ibm =================================================================== --- gcc/config/rs6000/t-ldouble-linux64le-ibm (revision 261755) +++ gcc/config/rs6000/t-ldouble-linux64le-ibm (working copy) @@ -1,26 +0,0 @@ -# Long double multilib libraries for PowerPC 64-bit little endian systems using -# IBM extended double as the long double type. -# -# Copyright (C) 2018 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -MULTILIB_OPTIONS += mabi=ieeelongdouble/mabi=ibmlongdouble -MULTILIB_DIRNAMES += ieee128 ibm128 -MULTILIB_OSDIRNAMES += mabi.ibmlongdouble=../lib64$(call if_multiarch,:powerpc64-linux-gnu) \ - mabi.ieeelongdouble=../lib64/ieee128$(call if_multiarch,:powerpc64-linux-gnu) \ - ../lib64$(call if_multiarch,:powerpc64-linux-gnu) Index: gcc/config/rs6000/t-ldouble-linux64le-ieee =================================================================== --- gcc/config/rs6000/t-ldouble-linux64le-ieee (revision 261755) +++ gcc/config/rs6000/t-ldouble-linux64le-ieee (working copy) @@ -1,26 +0,0 @@ -# Long double multilib libraries for PowerPC 64-bit little endian systems using -# IEEE 128-bit floating point as the long double type. -# -# Copyright (C) 2018 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -MULTILIB_OPTIONS += mabi=ieeelongdouble/mabi=ibmlongdouble -MULTILIB_DIRNAMES += ieee128 ibm128 -MULTILIB_OSDIRNAMES += mabi.ibmlongdouble=../lib64/ibm128$(call if_multiarch,:powerpc64-linux-gnu) \ - mabi.ieeelongdouble=../lib64$(call if_multiarch,:powerpc64-linux-gnu) \ - ../lib64$(call if_multiarch,:powerpc64-linux-gnu) Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi (revision 261755) +++ gcc/doc/install.texi (working copy) @@ -1902,17 +1902,6 @@ Until all of the libraries are converted point, it is not recommended to use @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 -select either @code{long double} format, unless you disable multilibs -with the @code{--disable-multilib} option. At present, -@code{long double} multilibs are not built on big endian PowerPC Linux -systems. If you are building multilibs, you will need to configure -the compiler using the @option{--with-system-zlib} option. - -If you do not set the @code{long double} type explicitly, no multilibs -will be generated. - @item --enable-fdpic On SH Linux systems, generate ELF FDPIC code.