From c7d8f446bacb8ef6ea48eae68aed389d3ef20af1 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 11 Jun 2013 23:22:49 +0000 Subject: [PATCH] re PR target/57589 (Linux powerpc -mcpu=native returns pointer to variable on stack in driver-rs6000.c) 2013-06-11 Michael Meissner PR target/57589 * config/rs6000/driver-rs6000.c (elf_platform): Make buffer static to allow returning address to AT_PLATFORM name. From-SVN: r199972 --- gcc/ChangeLog | 8 +++++++- gcc/config/rs6000/driver-rs6000.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 486b77ff4a31..86a7cb3a575b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-06-11 Michael Meissner + + PR target/57589 + * config/rs6000/driver-rs6000.c (elf_platform): Make buffer static + to allow returning address to AT_PLATFORM name. + 2013-06-11 Jan Hubicka * cgraph.c (cgraph_create_function_alias): Set weakref flag. @@ -24,7 +30,7 @@ (symtab_make_decl_local): Remove duplicated code. (symtab_alias_ultimate_target): Simplify. * varpool.c (varpool_create_variable_alias): Set weakref flag. - + 2013-06-11 DJ Delorie * config/rl78/rl78.c (TARGET_UNWIND_WORD_MODE): Define. diff --git a/gcc/config/rs6000/driver-rs6000.c b/gcc/config/rs6000/driver-rs6000.c index e608dce184c0..1a173d0b1cc9 100644 --- a/gcc/config/rs6000/driver-rs6000.c +++ b/gcc/config/rs6000/driver-rs6000.c @@ -167,7 +167,7 @@ elf_platform (void) if (fd != -1) { - char buf[1024]; + static char buf[1024]; ElfW(auxv_t) *av; ssize_t n; -- 2.43.5