gcc/gcc41-ppc64-ia64-GNU-stack.patch
Jakub Jelinek 95df1c0db6 4.1.2-20
2007-08-31 21:09:32 +00:00

87 lines
2.9 KiB
Diff

2007-08-27 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
* config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use
rs6000_elf_end_indicate_exec_stack.
* config/ia64/ia64.c (ia64_linux_file_end): new.
* config/ia64/linux.h (TARGET_ASM_FILE_END): Use ia64_linux_file_end.
--- gcc/config/rs6000/rs6000.c.jj 2007-06-27 12:10:19.000000000 +0200
+++ gcc/config/rs6000/rs6000.c 2007-08-27 19:27:24.000000000 +0200
@@ -638,6 +638,7 @@ static void rs6000_file_start (void);
static unsigned int rs6000_elf_section_type_flags (tree, const char *, int);
static void rs6000_elf_asm_out_constructor (rtx, int);
static void rs6000_elf_asm_out_destructor (rtx, int);
+static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED;
static void rs6000_elf_select_section (tree, int, unsigned HOST_WIDE_INT);
static void rs6000_elf_unique_section (tree, int);
static void rs6000_elf_select_rtx_section (enum machine_mode, rtx,
@@ -18896,6 +18897,20 @@ rs6000_elf_declare_function_name (FILE *
}
ASM_OUTPUT_LABEL (file, name);
}
+
+static void
+rs6000_elf_end_indicate_exec_stack (void)
+{
+ if (TARGET_32BIT)
+ file_end_indicate_exec_stack ();
+ else
+ {
+ int saved_trampolines_created = trampolines_created;
+ trampolines_created = 0;
+ file_end_indicate_exec_stack ();
+ trampolines_created = saved_trampolines_created;
+ }
+}
#endif
#if TARGET_XCOFF
--- gcc/config/rs6000/linux64.h.jj 2006-11-08 17:53:15.000000000 +0100
+++ gcc/config/rs6000/linux64.h 2007-08-27 19:25:09.000000000 +0200
@@ -549,7 +549,7 @@ while (0)
#undef DRAFT_V4_STRUCT_RET
#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
#define TARGET_POSIX_IO
--- gcc/config/ia64/linux.h.jj 2006-07-14 18:00:58.000000000 +0200
+++ gcc/config/ia64/linux.h 2007-08-27 19:21:12.000000000 +0200
@@ -5,7 +5,7 @@
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+#define TARGET_ASM_FILE_END ia64_linux_file_end
/* This is for -profile to use -lc_p instead of -lc. */
#undef CC1_SPEC
--- gcc/config/ia64/ia64.c.jj 2007-01-05 23:54:11.000000000 +0100
+++ gcc/config/ia64/ia64.c 2007-08-27 19:21:43.000000000 +0200
@@ -246,6 +246,8 @@ static void ia64_hpux_add_extern_decl (t
ATTRIBUTE_UNUSED;
static void ia64_hpux_file_end (void)
ATTRIBUTE_UNUSED;
+static void ia64_linux_file_end (void)
+ ATTRIBUTE_UNUSED;
static void ia64_init_libfuncs (void)
ATTRIBUTE_UNUSED;
static void ia64_hpux_init_libfuncs (void)
@@ -9096,4 +9098,13 @@ ia64_invalid_binary_op (int op ATTRIBUTE
return NULL;
}
+static void
+ia64_linux_file_end (void)
+{
+ int saved_trampolines_created = trampolines_created;
+ trampolines_created = 0;
+ file_end_indicate_exec_stack ();
+ trampolines_created = saved_trampolines_created;
+}
+
#include "gt-ia64.h"