From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id B1E22382E071 for ; Thu, 4 Mar 2021 21:08:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B1E22382E071 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 124L4YhJ129346; Thu, 4 Mar 2021 16:08:07 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37372qr9q3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 16:08:07 -0500 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 124L5dpO133488; Thu, 4 Mar 2021 16:08:07 -0500 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 37372qr9pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 16:08:07 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 124L71qJ027853; Thu, 4 Mar 2021 21:08:06 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma01dal.us.ibm.com with ESMTP id 371qmuxpvc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 21:08:06 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 124L85Wv29098450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Mar 2021 21:08:05 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A79FAC059; Thu, 4 Mar 2021 21:08:05 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A27FAC066; Thu, 4 Mar 2021 21:08:05 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.65.200.124]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Thu, 4 Mar 2021 21:08:04 +0000 (GMT) Date: Thu, 4 Mar 2021 16:08:03 -0500 From: Michael Meissner To: gcc-patches@gcc.gnu.org, Michael Meissner , Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Joseph Myers Subject: [PATCH V3] Do not build Decimal/Float128 conversions if --disable-decimal-float. Message-ID: <20210304210803.GA548@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Joseph Myers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_08:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040104 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_MANYTO, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 21:08:13 -0000 [PATCH 2/2 V3] Do not build Decimal/Float128 conversions if --disable-decimal-float. This patch disables building the Decimal/_Float128 conversion functions if the user configured the compiler with the --disable-decimal-float option. This is a much simpler patch to disable building the Decimal/Float128 conversion functions if decimal floating point was installed. It follows the method libgcc uses in Makefile to suppress building the normal Decimal support functions if decimal floating point is disabled. I have built bootstrap compilers for power9 little endian systems with the three different long double formats (IBM 128-bit, IEEE 128-bit, and 64-bit) and there were no regressions from previous runs. I have also build bootstrap compilers on a big endian power8 and there was no regression there either. I built two cross compilers from X86_64 to PowerPC, one with normal switches and the other with decimal floating point disabled. I verified that the Decimal/Float128 conversions are not enable. Finally I built a compiler on a little endian system with an older GLIBC. I verified that the linker reports that __strtoieee128 and __sprintfieee128 are not present, and aborts the link. Can I check this patch into the master branch? libgcc/ 2021-03-04 Michael Meissner * config/rs6000/t-float128 (fp128_dec_funcs): Do not set if --disable-decimal-float. (fp128_dec_objs): Do not set if --disable-decimal-float. --- libgcc/config/rs6000/t-float128 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128 index 8b089d4433c..83fbbb68788 100644 --- a/libgcc/config/rs6000/t-float128 +++ b/libgcc/config/rs6000/t-float128 @@ -23,8 +23,10 @@ fp128_softfp_shared_obj = $(addsuffix -sw_s$(objext),$(fp128_softfp_funcs)) fp128_softfp_obj = $(fp128_softfp_static_obj) $(fp128_softfp_shared_obj) # Decimal <-> _Float128 conversions +ifeq ($(decimal_float),yes) fp128_dec_funcs = _kf_to_sd _kf_to_dd _kf_to_td \ _sd_to_kf _dd_to_kf _td_to_kf +endif # Decimal <-> __ibm128 conversions ibm128_dec_funcs = _tf_to_sd _tf_to_dd _tf_to_td \ @@ -81,8 +83,10 @@ $(fp128_obj) : $(srcdir)/config/rs6000/quad-float128.h # Force the TF mode to/from decimal functions to be compiled with IBM long # double. Add building the KF mode to/from decimal conversions with explict # IEEE long double. +ifeq ($(decimal_float),yes) fp128_dec_objs = $(addsuffix $(objext),$(fp128_dec_funcs)) \ $(addsuffix _s$(objext),$(fp128_dec_funcs)) +endif ibm128_dec_objs = $(addsuffix $(objext),$(ibm128_dec_funcs)) \ $(addsuffix _s$(objext),$(ibm128_dec_funcs)) @@ -90,7 +94,9 @@ ibm128_dec_objs = $(addsuffix $(objext),$(ibm128_dec_funcs)) \ FP128_CFLAGS_DECIMAL = -mno-gnu-attribute -Wno-psabi -mabi=ieeelongdouble IBM128_CFLAGS_DECIMAL = -mno-gnu-attribute -Wno-psabi -mabi=ibmlongdouble +ifeq ($(decimal_float),yes) $(fp128_dec_objs) : INTERNAL_CFLAGS += $(FP128_CFLAGS_DECIMAL) +endif $(ibm128_dec_objs) : INTERNAL_CFLAGS += $(IBM128_CFLAGS_DECIMAL) $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep) -- 2.22.0 -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.ibm.com, phone: +1 (978) 899-4797