From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id F423B3858D28; Mon, 4 Oct 2021 18:34:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F423B3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 194IXSL5010339; Mon, 4 Oct 2021 13:33:28 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 194IXS3T010336; Mon, 4 Oct 2021 13:33:28 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 4 Oct 2021 13:33:27 -0500 From: Segher Boessenkool To: Jakub Jelinek Cc: fortran@gcc.gnu.org, gcc@gcc.gnu.org, Tobias Burnus , Michael Meissner , Jonathan Wakely Subject: Re: libgfortran.so SONAME and powerpc64le-linux ABI changes Message-ID: <20211004183327.GA10333@gate.crashing.org> References: <20211004100754.GL304296@tucnak> <20211004141410.GP304296@tucnak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211004141410.GP304296@tucnak> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 18:34:32 -0000 Hi! On Mon, Oct 04, 2021 at 04:14:10PM +0200, Jakub Jelinek wrote: > Based on some IRC discussion, yet another option would be bump libgfortran > SONAME (on all arches), make real(kind=16) on powerpc64le-linux mean > always IEEE quad (starting with GCC 12) and if wanted add support for > real(kind=15) meaning double double. > libgfortran would then on powerpc64le-linux use -mabi=ieeelongdouble to make > sure that regardless of the long double choice for C/C++ (whether default > configure time selection or explicit -mabi=*) GFC_REAL_16 is the __float128 > long double. > One problem with that is that I think IEEE quad long double support relies > on glibc 2.32 or later, so not sure what exactly would be done if gcc is > built against older glibc when it needs to call libm routines. Perhaps > convert to __ibm128, call the __ibm128 sinl etc. and convert back (big loss > of precision and range, but at least something). Eventually we should get a world where kind=16 is IEEE QP float everywhere, and kind=17 (or whatever) is double-double. Some current Power GCC targets support neither. Some support only double-double. Making IEEE QP float work on those (that is, those that are < power8) will require some work still: it should use libquadmath or similar, but that needs to be put into the ABIs, to define how parameter passing works for those types. Just treating it like a struct or an array of ints will work fine, but it needs to be written down. This is more than just Fortran. Mike? Segher