nvptx: Don't use global constructor for SSP setup
Given that nvptx newlib currently restricts itself to ELIX level 1, this is not already a problem. However, in the following we'd like to lift that restriction, and then run into: [...]/newlib/libc/ssp/stack_protector.c: In function ‘__stack_chk_init’: [...]/newlib/libc/ssp/stack_protector.c:31:1: sorry, unimplemented: global constructors not supported on this target 31 | } | ^ GCC patch "nvptx: Support global constructors/destructors via 'collect2'" has been posted, but not yet accepted. Until that is resolved, use the same manual SSP setup as for GCN.
This commit is contained in:
parent
52cb937004
commit
3b58032de1
|
@ -5,8 +5,8 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__AMDGCN__)
|
||||
/* GCN does not support constructors, yet. */
|
||||
#if defined(__AMDGCN__) || defined(__nvptx__)
|
||||
/* Global constructors not supported on this target, yet. */
|
||||
uintptr_t __stack_chk_guard = 0x00000aff; /* 0, 0, '\n', 255 */
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue