Second half of fix for PR toolchain/19265.
2003-03-14 Jason Thorpe <thorpej@wasabisystems.com> * c-decl.c (flag_hosted): Move from here... * toplev.c: ...to here. * c-tree.h (flag_hosted): Move extern declaration from here... * flags.h: ...to here. * config/alpha/alpha.c (alpha_initialize_trampoline): Only emit a call to __enable_execute_stack if flag_hosted is true. * config/i386/i386.c (x86_initialize_trampoline): Likewise. * config/sparc/sparc.c (sparc_initialize_trampoline) (sparc64_initialize_trampoline): Likewise. An updated version of this will be submitted to gcc.gnu.org.
This commit is contained in:
parent
d8108972ba
commit
d9cf1a068e
|
@ -490,10 +490,6 @@ int flag_traditional;
|
|||
|
||||
int flag_isoc9x = 0;
|
||||
|
||||
/* Nonzero means that we have builtin functions, and main is an int */
|
||||
|
||||
int flag_hosted = 1;
|
||||
|
||||
/* Nonzero means to allow single precision math even if we're generally
|
||||
being traditional. */
|
||||
int flag_allow_single_precision = 0;
|
||||
|
|
|
@ -439,10 +439,6 @@ extern int flag_cond_mismatch;
|
|||
|
||||
extern int flag_no_asm;
|
||||
|
||||
/* Nonzero means environment is hosted (i.e., not freestanding) */
|
||||
|
||||
extern int flag_hosted;
|
||||
|
||||
/* Nonzero means warn about implicit declarations. */
|
||||
|
||||
extern int warn_implicit;
|
||||
|
|
|
@ -3069,8 +3069,9 @@ alpha_initialize_trampoline (tramp, fnaddr, cxt, fnofs, cxtofs, jmpofs)
|
|||
}
|
||||
|
||||
#ifdef TRANSFER_FROM_TRAMPOLINE
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
if (flag_hosted)
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
#endif
|
||||
|
||||
if (jmpofs >= 0)
|
||||
|
|
|
@ -5763,7 +5763,8 @@ x86_initialize_trampoline (tramp, fnaddr, cxt)
|
|||
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 6)), disp);
|
||||
|
||||
#ifdef TRANSFER_FROM_TRAMPOLINE
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
if (flag_hosted)
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -5671,8 +5671,9 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt)
|
|||
JMPL r+i,d = 10dd ddd1 1100 0rrr rr1i iiii iiii iiii
|
||||
*/
|
||||
#ifdef TRANSFER_FROM_TRAMPOLINE
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
if (flag_hosted)
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
#endif
|
||||
|
||||
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 0)),
|
||||
|
@ -5718,8 +5719,9 @@ sparc64_initialize_trampoline (tramp, fnaddr, cxt)
|
|||
rtx tramp, fnaddr, cxt;
|
||||
{
|
||||
#ifdef TRANSFER_FROM_TRAMPOLINE
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
if (flag_hosted)
|
||||
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
|
||||
0, VOIDmode, 1, tramp, Pmode);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -522,6 +522,10 @@ extern int g_switch_set;
|
|||
|
||||
extern int inline_max_insns;
|
||||
|
||||
/* Nonzero means environment is hosted (i.e., not freestanding) */
|
||||
|
||||
extern int flag_hosted;
|
||||
|
||||
/* Nonzero if we dump in VCG format, not plain text. */
|
||||
extern int dump_for_graph;
|
||||
|
||||
|
|
|
@ -313,6 +313,13 @@ int mach_dep_reorg_dump = 0;
|
|||
#endif
|
||||
enum graph_dump_types graph_dump_format;
|
||||
|
||||
/* Nonzero if we're in a hosted environment. For C, that means that
|
||||
we have built-in functions, and main is an int. This also affects
|
||||
whether or not we attempt to e.g. enable stack execution for
|
||||
trampolines. */
|
||||
|
||||
int flag_hosted = 1;
|
||||
|
||||
/* Name for output file of assembly code, specified with -o. */
|
||||
|
||||
char *asm_file_name;
|
||||
|
|
Loading…
Reference in New Issue