-
- Downloads
nvptx target: Global constructor, destructor support, via nvptx-tools 'ld'
The function attributes 'constructor', 'destructor', and 'init_priority' now work, as do the C++ features making use of this. Test cases with effective target 'global_constructor' and 'init_priority' now generally work, and 'check-gcc-c++' test results greatly improve; no more "sorry, unimplemented: global constructors not supported on this target". For proper execution test results, this depends on <https://github.com/SourceryTools/nvptx-tools/commit/96f8fc59a757767b9e98157d95c21e9fef22a93b> "ld: Global constructor/destructor support". gcc/ * config/nvptx/nvptx.h: Configure global constructor, destructor support. gcc/testsuite/ * gcc.dg/no_profile_instrument_function-attr-1.c: GCC/nvptx is 'NO_DOT_IN_LABEL' but not 'NO_DOLLAR_IN_LABEL', so '$' may apper in identifiers. * lib/target-supports.exp (check_effective_target_global_constructor): Enable for nvptx. libgcc/ * config/nvptx/crt0.c (__gbl_ctors): New weak function. (__main): Invoke it. * config/nvptx/gbl-ctors.c: New. * config/nvptx/t-nvptx: Configure global constructor, destructor support.
Showing
- gcc/config/nvptx/nvptx.h 13 additions, 1 deletiongcc/config/nvptx/nvptx.h
- gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c
- gcc/testsuite/lib/target-supports.exp 1 addition, 2 deletionsgcc/testsuite/lib/target-supports.exp
- libgcc/config/nvptx/crt0.c 12 additions, 0 deletionslibgcc/config/nvptx/crt0.c
- libgcc/config/nvptx/gbl-ctors.c 74 additions, 0 deletionslibgcc/config/nvptx/gbl-ctors.c
- libgcc/config/nvptx/t-nvptx 8 additions, 1 deletionlibgcc/config/nvptx/t-nvptx
Loading