From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by sourceware.org (Postfix) with ESMTPS id 47D143858416 for ; Fri, 22 Oct 2021 13:25:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47D143858416 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 19MDPTux030055 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 22 Oct 2021 15:25:30 +0200 Received: from USCIMMBX004.net.plm.eds.com ([161.134.128.186]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTPS id 19MDPPCA028378 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 22 Oct 2021 15:25:29 +0200 Received: from BELEMMBX004.net.plm.eds.com (194.138.214.87) by USCIMMBX004.net.plm.eds.com (161.134.128.186) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 22 Oct 2021 09:24:34 -0400 Received: from BELEMMBX004.net.plm.eds.com (194.138.214.87) by BELEMMBX004.net.plm.eds.com (194.138.214.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 22 Oct 2021 15:24:30 +0200 Received: from BELEMMBX004.net.plm.eds.com ([::1]) by BELEMMBX004.net.plm.eds.com ([::1]) with mapi id 15.01.2242.012; Fri, 22 Oct 2021 15:24:30 +0200 From: "Dallman, John" To: "gcc-help@gcc.gnu.org" Subject: C, -fexceptions, libgcc_s, and related matters on arm64 Thread-Topic: C, -fexceptions, libgcc_s, and related matters on arm64 Thread-Index: AdfHR6jZ/G6Xra3dRMSJsULJymnBlg== Date: Fri, 22 Oct 2021 13:24:30 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-document-confidentiality: NotClassified x-originating-ip: [194.138.214.54] X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1018-26482.007 X-TM-AS-Result: No-25.621000-5.000000-10 X-TMASE-MatchedRID: ZSiFcS5rSL1E9zIW2XrY6/QWw+d3feoGjzObk4wm1U727WtDgGBc8nIF LjP03wGM9GLEqnUIVjuv1j/2L7xP1k17oyWse8Ka6192fv1gQabUnnzZaR2HppxVZzZr7+O7DdU bOGM2b+1+YFLISofIH4pAOeazK824c18u2Wlik0II7oSQXADHuyFXb/D0c7S5olVO7uyOCDWVHb cFIV0fAdO4/xxlKg674dOsNKuqfazCfvo3UgFFJCexD9ZB0cjifNar6xV4SC+tIAhaF1t673e5j VG6a6tKdPWv7/6INIL+D3RLoTW33V9lqmELrLDR3c9Nn4VZvABw24KukLNVyqNT4eJsLoMryHdf pwipSH4kDlZji/hSAcrU3m4wf5VQZhY9JS5+FsLdrzpuJQ3LwCcbFTX5PWQ4AD5jSg1rFtDjRq1 1aB4d6nQ8D+SLaQjs3rE8Oo7Zj65JJOsmoFihLOeJm6LClLmHJL07trKZ+y3fNKD9uRfMaV3n+b eqvEXMSprpPKHJe8+T9bd2q/Jc0wvBPGQoLW6ll+soBKtnVK2GDAeCVZktRGK3N9p/OFh6ezSI3 KNQ1fI4No34L92afffnaHkTI99QcOiL5ZrDbJL1DaKIH7Nh6ln4OKSCBYfHBxsweNg3EaGFkCkk B0UMNpsoi2XrUn/Jzz3jehzenezoafntNxwr9iAHAopEd76vuLfIztJKOs2X1ZTcDzTnhHmUuw6 iCMVTfa9tubBw3eOJ3CFf9Cslgw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--25.621000-5.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1018-26482.007 MIME-Version: 1.0 X-TM-SNTS-SMTP: 8F7B491B7AD730817F925A9942833BF19E2A62A516B0FE67E13BD6B8F73B2E122 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_20, HTML_MESSAGE, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2021 13:25:34 -0000 I work on a commercial mathematical modelling library, built from C code, a= nd delivered on Linux as a .so. It has to be capable of having C++ exceptio= ns thrown through it, as many of the applications that use it are C++. On x86-64 CentOS 7, with GCC 4.8.3 driven by the LSB 5.0 lsbcc, I compile w= ith -fexceptions, which causes some of my object files to need __gcc_person= ality_v0 and _Unwind_Resume, I link with -shared-libgcc and -lgcc_s. That s= atisfies the requirements for __gcc_personality_v0 and _Unwind_Resume, and = allows C++ exceptions to be thrown from below me in the call stack, propaga= te through me, and be caught above me. That's fine. I'm starting to build for arm64 on Ubuntu 20.04, with GCC 9.3 and no LSB to= ols involved. I use -fexceptions, but that does not generate any need for _= _gcc_personality_v0, _Unwind_Resume or any of the other symbols in libgcc_s= .so. I'm a bit puzzled about this, and nervous about accepting it as normal= . There are no Linux arm64 versions of the applications that use the librar= y yet, so my ability to test C++ exception throwing through the library is = limited to trivial programs: all of the test harnesses I have are C. My x86-64 compile options are: /opt/lsb/bin/lsbcc -m64 -O2 -fno-strict-alia= sing -fPIC -D _POSIX_SOURCE -D_POSIX_C_SOURCE=3D200809L -c -fexceptions -st= d=3Dc99 -Wformat -Wformat-security My arm64 compile options are similar: cc -march=3Darmv8-a -ffp-contract=3Do= ff -O -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=3D200112L -c -fexceptions -st= d=3Dc99 -Wformat -Wformat-security -fstack-protector-strong -fno-strict-ali= asing Any suggestions? Thanks in advance, -- John Dallman Siemens Digital Industries Software ----------------- Siemens Industry Software Limited is a limited company registered in Englan= d and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surr= ey, GU16 8QD.