Hi! On 2022-07-14T19:39:40+0100, Jonathan Wakely wrote: > On Thu, 14 Jul 2022 at 19:14, Thomas Schwinge wrote: >> I'm looking into building GCN, nvptx offloading libstdc++ [...] >> While there is some experimental/incomplete/not-to-be-relied-on support >> for PTX symbol aliases, we're currently generally running into >> "error: alias definitions not supported in this configuration" >> [...]/libstdc++-v3/libsupc++/tinfo.cc:55:1: error: alias definitions not supported in this configuration >> 55 | std::type_info::__equal (const std::type_info& arg) const _GLIBCXX_NOEXCEPT >> | ^~~ >> make[4]: *** [Makefile:777: tinfo.lo] Error 1 >> >> That's 'libstdc++-v3/libsupc++/tinfo.cc': >> >> 1 // Methods for type_info for -*- C++ -*- Run Time Type Identification. >> [...] >> 39 // We can't rely on common symbols being shared between shared objects. >> 40 bool std::type_info:: >> 41 operator== (const std::type_info& arg) const _GLIBCXX_NOEXCEPT >> 42 { >> 43 #if __GXX_MERGED_TYPEINFO_NAMES >> 44 return name () == arg.name (); >> 45 #else >> 46 /* The name() method will strip any leading '*' prefix. Therefore >> 47 take care to look at __name rather than name() when looking for >> 48 the "pointer" prefix. */ >> 49 return (&arg == this) >> 50 || (__name[0] != '*' && (__builtin_strcmp (name (), arg.name ()) == 0)); >> 51 #endif >> 52 } >> 53 >> 54 bool >> 55 std::type_info::__equal (const std::type_info& arg) const _GLIBCXX_NOEXCEPT >> 56 __attribute__((alias("_ZNKSt9type_infoeqERKS_"))); >> 57 #endif >> [...] >> >> ..., so there's a manual alias from the line 55 function to the line 41 >> function (if I got that right). > > That's only there for backwards compatibility on ARM EABI and other > targets that don't define __GXX_TYPEINFO_EQUALITY_INLINE==1. > > My suggestion would be to define that macro for the target. Thanks, that did put me on the right track -- we shall define it this way; indirectly. Pushed to master branch commit 9837f62f066db532c9db6df38ccf2653d0c3a960 "nvptx: Use the usual '#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)'", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955