[gcc(refs/users/aoliva/heads/testme)] strub: sparc: omit frame in strub_leave

Alexandre Oliva aoliva@gcc.gnu.org
Thu Dec 14 13:45:28 GMT 2023


https://gcc.gnu.org/g:17c889a344fd7afee77c12a04faf12e8fe1e807d

commit 17c889a344fd7afee77c12a04faf12e8fe1e807d
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Dec 14 03:21:37 2023 -0300

    strub: sparc: omit frame in strub_leave

Diff:
---
 libgcc/config.host          | 2 ++
 libgcc/config/sparc/t-sparc | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/libgcc/config.host b/libgcc/config.host
index 694e3e9f54c..54d06978a5d 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -199,9 +199,11 @@ riscv*-*-*)
 	;;
 sparc64*-*-*)
 	cpu_type=sparc
+	tmake_file="${tmake_file} sparc/t-sparc"
 	;;
 sparc*-*-*)
 	cpu_type=sparc
+	tmake_file="${tmake_file} sparc/t-sparc"
 	;;
 s390*-*-*)
 	cpu_type=s390
diff --git a/libgcc/config/sparc/t-sparc b/libgcc/config/sparc/t-sparc
new file mode 100644
index 00000000000..fb1bf1fc29c
--- /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


More information about the Gcc-cvs mailing list