From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 9D6E73858C55 for ; Thu, 14 Jul 2022 14:53:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D6E73858C55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,271,1650960000"; d="scan'208";a="79725360" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 14 Jul 2022 06:16:50 -0800 IronPort-SDR: ON9o7T20oQIq0m4iVWepHDkbEIPKZloxxISOEA1B+j0saxAxqj7a++iffzYoQUKvSa7z4Mv6Gd 4N/21VaVsA6YwOyPIBJdwjzb4Wms3nMBs15QGfUDc9FuOIKuG4Xlcp2jdWO60sNjtxl5UFZ0Yw Z4RX+wT53ajLCjcVYUlwK5KVoE/BgjCfY71vOCtiz6HovcKec2pdwrXf4wCaNLizJppMEWhX80 Felc0sf6V/hlg91n463F7soEPnT1ljeOmZRBa6AOhEDI6TuA56wNlGAMxiTOI8ElO1VfkYyzul KV4= From: Thomas Schwinge To: , Jonathan Wakely Subject: libstdc++ "freestanding" ('--disable-hosted-libstdcxx') with '-fno-rtti', '-fno-exceptions': 'libstdc++-v3/libsupc++/eh_alloc.cc' global constructors User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Thu, 14 Jul 2022 13:54:15 +0200 Message-ID: <87a69bgba0.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 14:53:09 -0000 Hi! In context of '[OpenMP][AMDGCN][nvptx] C++ offloading: unresolved _Znwm =3D "operator new(unsigned long)"' I'm looking into building GCN, nvptx offloading libstdc++ "freestanding" ('--disable-hosted-libstdcxx') with '-fno-rtti', '-fno-exceptions'. (I've basically got these things wired up; details to be shared later.) For nvptx, I'm running into: In function =E2=80=98(static initializers for [...]/libstdc++-v3/libsup= c++/eh_alloc.cc)=E2=80=99: cc1plus: sorry, unimplemented: global constructors not supported on thi= s target make[4]: *** [Makefile:777: eh_alloc.lo] Error 1 ... because, indeed, "global constructors not supported" for nvptx at this time. This may change, but I'd first like to get clarified conceptually to which extent 'libstdc++-v3/libsupc++/eh_alloc.cc' is actually relevant for such a libstdc++ configuration, and/or whether this should be expected to compile fine already? Do certain things simply need to be '#if'-conditionalized, or similar, for example? I've not yet looked into the details; hoping that's maybe easy for you to answer? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955