https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119853
Bug ID: 119853
Summary: GCN, nvptx: Review 'DEFAULT_USE_CXA_ATEXIT'
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: openacc, openmp
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: ams at gcc dot gnu.org, burnus at gcc dot gnu.org,
jakub at gcc dot gnu.org, vries at gcc dot gnu.org
Target Milestone: ---
Target: GCN, nvptx
For both powerpc64le and x86_64 GNU/Linux host, we have
'build-gcc/gcc/auto-host.h':
/* Define if you want to use __cxa_atexit, rather than atexit, to register
C++
destructors for local statics and global objects. This is essential for
fully standards-compliant handling of destructors, but requires
__cxa_atexit in libc. */
#ifndef USED_FOR_TARGET
#define DEFAULT_USE_CXA_ATEXIT 2
For GCN, nvptx target as well as offloading, we have:
/* #undef DEFAULT_USE_CXA_ATEXIT */
Reference: <https://itanium-cxx-abi.github.io/cxx-abi/abi.html#dso-dtor> "DSO
Object Destruction API".
Would it be relevant to align? ..., if only in terms of host/offloading
compilation conformance (Have not yet researched what the implications are.)
"Conventional" DSO unloading is not a concern, but what are the expectations re
C++ destructors for dynamic (or at program end) unloading of device code
modules?