From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 12BBA3858425; Wed, 5 Jan 2022 21:20:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12BBA3858425 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 205KkOi2028612; Wed, 5 Jan 2022 21:20:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dcmawy9hn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jan 2022 21:20:52 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 205KkCMD027752; Wed, 5 Jan 2022 21:20:51 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dcmawy9he-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jan 2022 21:20:51 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 205LJ3ZH006395; Wed, 5 Jan 2022 21:20:51 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02wdc.us.ibm.com with ESMTP id 3daekb6nse-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jan 2022 21:20:51 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 205LKnxj20578730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jan 2022 21:20:49 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7DC66A057; Wed, 5 Jan 2022 21:20:49 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21FDC6A054; Wed, 5 Jan 2022 21:20:49 +0000 (GMT) Received: from toto.the-meissners.org (unknown [9.65.244.214]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS; Wed, 5 Jan 2022 21:20:48 +0000 (GMT) Date: Wed, 5 Jan 2022 16:20:47 -0500 From: Michael Meissner To: Thomas Koenig Cc: Michael Meissner , Bill Schmidt , "fortran@gcc.gnu.org" , Jakub Jelinek , Segher Boessenkool , Peter Bergner , David Edelsohn , gcc mailing list Subject: Re: [power-iee128] How to specify linker flags Message-ID: Mail-Followup-To: Michael Meissner , Thomas Koenig , Bill Schmidt , "fortran@gcc.gnu.org" , Jakub Jelinek , Segher Boessenkool , Peter Bergner , David Edelsohn , gcc mailing list References: <63b5434e-f8fa-97b3-d357-e25094579b16@netcologne.de> <541fa494-ce3c-50f2-367b-f0dd492dcf45@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <541fa494-ce3c-50f2-367b-f0dd492dcf45@netcologne.de> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7eHbOXyAqqJ_UC7ybS12vjLWbF_KgJT0 X-Proofpoint-ORIG-GUID: fR_wdNQnnfmgriMRobspHkhO-t3XbUsX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-05_07,2022-01-04_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 malwarescore=0 impostorscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxlogscore=957 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201050133 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Wed, 05 Jan 2022 21:20:54 -0000 On Sun, Jan 02, 2022 at 11:58:29PM +0100, Thomas Koenig wrote: > Hi Michael, > > > If you are building libraries that contain modules with multiple long double > > types, you must use the '-mno-gnu-attribute'. We also use the '-Wno-psabi' > > option, which silences the warning that you are switching long double types (if > > glibc is not 2.34 or newer). We may need to tweak -Wno-psabi for use with > > Fortran. > > I am now at the point where the object files are also compiled correctly > for the gfortran specifics: > > 0000000000000000 <_gfortran_specific__abs_r17>: > 0: 09 00 43 f4 lxv vs34,0(r3) > 4: 48 16 40 fc xsabsqp v2,v2 > 8: 20 00 80 4e blr > > However, the linker complains, as you said it would, about the different > formats: > > /opt/at15.0/bin/ld: .libs/maxloc0_4_r16.o uses IBM long double, > .libs/_abs_r17.o uses IEEE long double > /opt/at15.0/bin/ld: failed to merge target specific data of file > .libs/_abs_r17.o > > I know next to nothing about libtool, so I do not know how to > add the flags so the linker can find them. > > Any pointers? > > (I have not yet committed the changes because I do not want to > commit something that does not compile. If anybody wants to > take a look, it's on the ieee128 virtual machine under > /home/tkoenig/ieee ). I'm just getting back into things after being off-line for the winter holidays. As others have said, you need to use the GCC option -mno-gnu-attributes on any module that handles one of the long double types if you are building libraries that can handle both. Note, for C/C++ languages, you should add -Wno-psabi to the options as well as -mabi={ieee,ibm}longdouble. This suppresses the warning that says you are changing the long double type. If you have configred GCC against GLIBC 2.32 or newer, then you don't need the -Wno-psabi option. Unfortunately, you can't use -Wno-psabi on languages like Fortran. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meissner@linux.ibm.com