summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h3
-rw-r--r--gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
index 17cb85e46bd..25e92a18bec 100644
--- a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
+++ b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
@@ -127,3 +127,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+#undef TRAMPOLINE_SIZE
+#define TRAMPOLINE_SIZE 40
+
diff --git a/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c b/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
index 0ba733942fa..991b81e1848 100644
--- a/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
+++ b/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
@@ -12510,6 +12510,13 @@ rs6000_initialize_trampoline (addr, fnaddr, cxt)
break;
}
+ /* Call __enable_execute_stack after writing onto the stack to make sure
+ the stack address is accessible. */
+#ifdef TRANSFER_FROM_TRAMPOLINE
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
+ LCT_NORMAL, VOIDmode, 1, addr, Pmode);
+#endif
+
return;
}