summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2011-11-09 15:59:02 +0000
committerfabient <fabient@FreeBSD.org>2011-11-09 15:59:02 +0000
commit3fcd15923b97a8cf5a311fe1b51a5d8e70bf89af (patch)
tree9bec3e45305f494f464aa6eb7d1ad32dec61aef5 /contrib/gcc
parent97385fb7fa32c9593b5794bd51b90c8ee79751da (diff)
downloadFreeBSD-src-3fcd15923b97a8cf5a311fe1b51a5d8e70bf89af.zip
FreeBSD-src-3fcd15923b97a8cf5a311fe1b51a5d8e70bf89af.tar.gz
Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel. Related gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965 PR: 161128 MFC after: 1 week
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/config/arm/arm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/gcc/config/arm/arm.c b/contrib/gcc/config/arm/arm.c
index 670e791..18f6fe5 100644
--- a/contrib/gcc/config/arm/arm.c
+++ b/contrib/gcc/config/arm/arm.c
@@ -3217,7 +3217,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
gcc_assert (!no_new_pseudos);
if (arm_pic_register != INVALID_REGNUM)
{
- cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation
@@ -3229,7 +3230,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
{
rtx seq;
- cfun->machine->pic_reg = gen_reg_rtx (Pmode);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_reg_rtx (Pmode);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation
OpenPOWER on IntegriCloud