diff options
author | Alexandre Oliva <oliva@adacore.com> | 2023-12-14 03:21:37 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2023-12-20 05:18:17 -0300 |
commit | 9fa35dbb901b11d31a897cc88c9258e7cd35b899 (patch) | |
tree | 8637aee10dde94c081fcf658f007c0119a6bb31b /libgcc/config/sparc | |
parent | 672db38c6f0723ca57fe8ff4c43422341e7fb857 (diff) | |
download | gcc-9fa35dbb901b11d31a897cc88c9258e7cd35b899.zip gcc-9fa35dbb901b11d31a897cc88c9258e7cd35b899.tar.gz gcc-9fa35dbb901b11d31a897cc88c9258e7cd35b899.tar.bz2 |
strub: sparc: omit frame in strub_leave [PR112917]
If we allow __strub_leave to allocate a frame on sparc, it will
overlap with a lot of the stack range we're supposed to scrub, because
of the large fixed-size outgoing args and register save area.
Unfortunately, setting up the PIC register seems to prevent the frame
pointer from being omitted.
Since the strub runtime doesn't issue calls or use global variables,
at least on sparc, disabling PIC to compile strub.c seems to do the
right thing.
for libgcc/ChangeLog
PR middle-end/112917
* config.host (sparc, sparc64): Enable...
* config/sparc/t-sparc: ... this new fragment.
Diffstat (limited to 'libgcc/config/sparc')
-rw-r--r-- | libgcc/config/sparc/t-sparc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgcc/config/sparc/t-sparc b/libgcc/config/sparc/t-sparc new file mode 100644 index 0000000..fb1bf1f --- /dev/null +++ b/libgcc/config/sparc/t-sparc @@ -0,0 +1,4 @@ +# This is needed for __strub_leave to omit the frame pointer, without +# which it will allocate a register save area on the stack and leave +# it unscrubbed and most likely unused, because it's a leaf function. +CFLAGS-strub.c += -fno-PIC -fomit-frame-pointer |