aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--4.4.4/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch93
-rw-r--r--4.4.4/gentoo/README.history3
-rw-r--r--4.4.5/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch93
-rw-r--r--4.4.5/gentoo/README.history3
-rw-r--r--4.5.0/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch89
-rw-r--r--4.5.0/gentoo/README.history1
-rw-r--r--4.5.1/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch89
-rw-r--r--4.5.1/gentoo/README.history3
-rw-r--r--4.5.2/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch89
-rw-r--r--4.5.2/gentoo/README.history3
10 files changed, 464 insertions, 2 deletions
diff --git a/4.4.4/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch b/4.4.4/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch
new file mode 100644
index 0000000..59b62e4
--- /dev/null
+++ b/4.4.4/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch
@@ -0,0 +1,93 @@
+https://bugs.gentoo.org/347281
+
+backported from gcc-4.6
+
+From a9321d3549b5d29024c4bb011bf6e75903aef4e9 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Date: Sat, 9 Oct 2010 12:45:39 +0200
+Subject: [PATCHv3] PowerPC: Add msingle-pic-base option.
+
+Do not generate fPIC/fpic prologue nor save
+and restore PIC register.
+
+Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+---
+ v2: Use Var instead of Mask and add some docs per
+ Michael Meissner <meissner@linux.vnet.ibm.com>
+ v3: Make order in if statement consistent.
+
+ gcc/config/rs6000/rs6000.c | 5 +++++
+ gcc/config/rs6000/rs6000.opt | 4 ++++
+ gcc/doc/invoke.texi | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+index 63f8ef9..310d28b 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -16036,8 +16036,10 @@ rs6000_reg_live_or_pic_offset_p (int reg)
+ return ((df_regs_ever_live_p (reg)
+ && (!call_used_regs[reg]
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && TARGET_TOC && TARGET_MINIMAL_TOC)))
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ }
+@@ -16737,6 +16739,9 @@ rs6000_emit_prologue (void)
+ insn = emit_insn (generate_set_vrsave (reg, info, 0));
+ }
+
++ if (TARGET_SINGLE_PIC_BASE)
++ return; /* Do not set PIC register */
++
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ || (DEFAULT_ABI == ABI_V4
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 8a62352..2adb6dd 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -119,6 +119,10 @@ mupdate
+ Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+ Generate load/store with update instructions
+
++msingle-pic-base
++Target Report Var(TARGET_SINGLE_PIC_BASE) Init(0)
++Do not load the PIC register in function prologues
++
+ mavoid-indexed-addresses
+ Target Report Var(TARGET_AVOID_XFORM) Init(-1)
+ Avoid generation of indexed load/store instructions when possible
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 393e418..fc30537 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -728,7 +728,7 @@ See RS/6000 and PowerPC Options.
+ -mstrict-align -mno-strict-align -mrelocatable @gol
+ -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
+ -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
+--mdynamic-no-pic -maltivec -mswdiv @gol
++-mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
+ -mprioritize-restricted-insns=@var{priority} @gol
+ -msched-costly-dep=@var{dependence_type} @gol
+ -minsert-sched-nops=@var{scheme} @gol
+@@ -14129,6 +14129,13 @@ relocatable, but that its external references are relocatable. The
+ resulting code is suitable for applications, but not shared
+ libraries.
+
++@item -msingle-pic-base
++@opindex msingle-pic-base
++Treat the register used for PIC addressing as read-only, rather than
++loading it in the prologue for each function. The run-time system is
++responsible for initializing this register with an appropriate value
++before execution begins.
++
+ @item -mprioritize-restricted-insns=@var{priority}
+ @opindex mprioritize-restricted-insns
+ This option controls the priority that is assigned to
+--
+1.7.2.2
+
diff --git a/4.4.4/gentoo/README.history b/4.4.4/gentoo/README.history
index 137b680..c21313b 100644
--- a/4.4.4/gentoo/README.history
+++ b/4.4.4/gentoo/README.history
@@ -1,3 +1,6 @@
+1.5 [pending]
+ + 30_all_gcc-4.4-ppc-msingle-pic-base.patch
+
1.4 12.02.2011
+ 60_all_4.4.5_hppa-wrong-code.patch
diff --git a/4.4.5/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch b/4.4.5/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch
new file mode 100644
index 0000000..59b62e4
--- /dev/null
+++ b/4.4.5/gentoo/30_all_gcc-4.4-ppc-msingle-pic-base.patch
@@ -0,0 +1,93 @@
+https://bugs.gentoo.org/347281
+
+backported from gcc-4.6
+
+From a9321d3549b5d29024c4bb011bf6e75903aef4e9 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Date: Sat, 9 Oct 2010 12:45:39 +0200
+Subject: [PATCHv3] PowerPC: Add msingle-pic-base option.
+
+Do not generate fPIC/fpic prologue nor save
+and restore PIC register.
+
+Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+---
+ v2: Use Var instead of Mask and add some docs per
+ Michael Meissner <meissner@linux.vnet.ibm.com>
+ v3: Make order in if statement consistent.
+
+ gcc/config/rs6000/rs6000.c | 5 +++++
+ gcc/config/rs6000/rs6000.opt | 4 ++++
+ gcc/doc/invoke.texi | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+index 63f8ef9..310d28b 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -16036,8 +16036,10 @@ rs6000_reg_live_or_pic_offset_p (int reg)
+ return ((df_regs_ever_live_p (reg)
+ && (!call_used_regs[reg]
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && TARGET_TOC && TARGET_MINIMAL_TOC)))
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ }
+@@ -16737,6 +16739,9 @@ rs6000_emit_prologue (void)
+ insn = emit_insn (generate_set_vrsave (reg, info, 0));
+ }
+
++ if (TARGET_SINGLE_PIC_BASE)
++ return; /* Do not set PIC register */
++
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ || (DEFAULT_ABI == ABI_V4
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 8a62352..2adb6dd 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -119,6 +119,10 @@ mupdate
+ Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+ Generate load/store with update instructions
+
++msingle-pic-base
++Target Report Var(TARGET_SINGLE_PIC_BASE) Init(0)
++Do not load the PIC register in function prologues
++
+ mavoid-indexed-addresses
+ Target Report Var(TARGET_AVOID_XFORM) Init(-1)
+ Avoid generation of indexed load/store instructions when possible
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 393e418..fc30537 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -728,7 +728,7 @@ See RS/6000 and PowerPC Options.
+ -mstrict-align -mno-strict-align -mrelocatable @gol
+ -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
+ -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
+--mdynamic-no-pic -maltivec -mswdiv @gol
++-mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
+ -mprioritize-restricted-insns=@var{priority} @gol
+ -msched-costly-dep=@var{dependence_type} @gol
+ -minsert-sched-nops=@var{scheme} @gol
+@@ -14129,6 +14129,13 @@ relocatable, but that its external references are relocatable. The
+ resulting code is suitable for applications, but not shared
+ libraries.
+
++@item -msingle-pic-base
++@opindex msingle-pic-base
++Treat the register used for PIC addressing as read-only, rather than
++loading it in the prologue for each function. The run-time system is
++responsible for initializing this register with an appropriate value
++before execution begins.
++
+ @item -mprioritize-restricted-insns=@var{priority}
+ @opindex mprioritize-restricted-insns
+ This option controls the priority that is assigned to
+--
+1.7.2.2
+
diff --git a/4.4.5/gentoo/README.history b/4.4.5/gentoo/README.history
index 37003ce..2fb7cf6 100644
--- a/4.4.5/gentoo/README.history
+++ b/4.4.5/gentoo/README.history
@@ -1,4 +1,5 @@
-1.3 pending
+1.3 [pending]
+ + 30_all_gcc-4.4-ppc-msingle-pic-base.patch
+ 41_all_4.4.5-msabi.patch
1.2 12.02.2011
diff --git a/4.5.0/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch b/4.5.0/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
new file mode 100644
index 0000000..217f4f4
--- /dev/null
+++ b/4.5.0/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/347281
+
+backported from gcc-4.6
+
+From aaf90e018802d80e9cd6ba86c6d03aee1456d737 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Date: Sat, 9 Oct 2010 12:45:39 +0200
+Subject: [PATCH] PowerPC: Add msingle-pic-base option, gcc 4.5.
+
+Do not generate fPIC/fpic prologue nor save
+and restore PIC register.
+
+Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+---
+ gcc/config/rs6000/rs6000.c | 5 +++++
+ gcc/config/rs6000/rs6000.opt | 4 ++++
+ gcc/doc/invoke.texi | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+index 01e6d71..1552ec1 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -18553,8 +18553,10 @@ rs6000_reg_live_or_pic_offset_p (int reg)
+ return ((df_regs_ever_live_p (reg)
+ && (!call_used_regs[reg]
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && TARGET_TOC && TARGET_MINIMAL_TOC)))
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ }
+@@ -19305,6 +19307,9 @@ rs6000_emit_prologue (void)
+ insn = emit_insn (generate_set_vrsave (reg, info, 0));
+ }
+
++ if (TARGET_SINGLE_PIC_BASE)
++ return; /* Do not set PIC register */
++
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ || (DEFAULT_ABI == ABI_V4
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 63f0f8c..1c97c94 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -163,6 +163,10 @@ mupdate
+ Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+ Generate load/store with update instructions
+
++msingle-pic-base
++Target Report Var(TARGET_SINGLE_PIC_BASE) Init(0)
++Do not load the PIC register in function prologues
++
+ mavoid-indexed-addresses
+ Target Report Var(TARGET_AVOID_XFORM) Init(-1)
+ Avoid generation of indexed load/store instructions when possible
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index a1846dc..32e17b6 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -765,7 +765,7 @@ See RS/6000 and PowerPC Options.
+ -mstrict-align -mno-strict-align -mrelocatable @gol
+ -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
+ -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
+--mdynamic-no-pic -maltivec -mswdiv @gol
++-mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
+ -mprioritize-restricted-insns=@var{priority} @gol
+ -msched-costly-dep=@var{dependence_type} @gol
+ -minsert-sched-nops=@var{scheme} @gol
+@@ -15221,6 +15221,13 @@ relocatable, but that its external references are relocatable. The
+ resulting code is suitable for applications, but not shared
+ libraries.
+
++@item -msingle-pic-base
++@opindex msingle-pic-base
++Treat the register used for PIC addressing as read-only, rather than
++loading it in the prologue for each function. The run-time system is
++responsible for initializing this register with an appropriate value
++before execution begins.
++
+ @item -mprioritize-restricted-insns=@var{priority}
+ @opindex mprioritize-restricted-insns
+ This option controls the priority that is assigned to
+--
+1.7.2.2
+
diff --git a/4.5.0/gentoo/README.history b/4.5.0/gentoo/README.history
index 8752c6c..706b36c 100644
--- a/4.5.0/gentoo/README.history
+++ b/4.5.0/gentoo/README.history
@@ -1,4 +1,5 @@
1.5 [pending]
+ + 30_all_gcc-4.5-ppc-msingle-pic-base.patch
U 53_all_gcc4-superh-default-multilib.patch
- 94_all_gcc-4.3.3-pch-nostdinc-tr1.patch
+ 94_all_gcc-4.5-pch-nostdinc.patch
diff --git a/4.5.1/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch b/4.5.1/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
new file mode 100644
index 0000000..217f4f4
--- /dev/null
+++ b/4.5.1/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/347281
+
+backported from gcc-4.6
+
+From aaf90e018802d80e9cd6ba86c6d03aee1456d737 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Date: Sat, 9 Oct 2010 12:45:39 +0200
+Subject: [PATCH] PowerPC: Add msingle-pic-base option, gcc 4.5.
+
+Do not generate fPIC/fpic prologue nor save
+and restore PIC register.
+
+Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+---
+ gcc/config/rs6000/rs6000.c | 5 +++++
+ gcc/config/rs6000/rs6000.opt | 4 ++++
+ gcc/doc/invoke.texi | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+index 01e6d71..1552ec1 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -18553,8 +18553,10 @@ rs6000_reg_live_or_pic_offset_p (int reg)
+ return ((df_regs_ever_live_p (reg)
+ && (!call_used_regs[reg]
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && TARGET_TOC && TARGET_MINIMAL_TOC)))
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ }
+@@ -19305,6 +19307,9 @@ rs6000_emit_prologue (void)
+ insn = emit_insn (generate_set_vrsave (reg, info, 0));
+ }
+
++ if (TARGET_SINGLE_PIC_BASE)
++ return; /* Do not set PIC register */
++
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ || (DEFAULT_ABI == ABI_V4
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 63f0f8c..1c97c94 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -163,6 +163,10 @@ mupdate
+ Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+ Generate load/store with update instructions
+
++msingle-pic-base
++Target Report Var(TARGET_SINGLE_PIC_BASE) Init(0)
++Do not load the PIC register in function prologues
++
+ mavoid-indexed-addresses
+ Target Report Var(TARGET_AVOID_XFORM) Init(-1)
+ Avoid generation of indexed load/store instructions when possible
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index a1846dc..32e17b6 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -765,7 +765,7 @@ See RS/6000 and PowerPC Options.
+ -mstrict-align -mno-strict-align -mrelocatable @gol
+ -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
+ -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
+--mdynamic-no-pic -maltivec -mswdiv @gol
++-mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
+ -mprioritize-restricted-insns=@var{priority} @gol
+ -msched-costly-dep=@var{dependence_type} @gol
+ -minsert-sched-nops=@var{scheme} @gol
+@@ -15221,6 +15221,13 @@ relocatable, but that its external references are relocatable. The
+ resulting code is suitable for applications, but not shared
+ libraries.
+
++@item -msingle-pic-base
++@opindex msingle-pic-base
++Treat the register used for PIC addressing as read-only, rather than
++loading it in the prologue for each function. The run-time system is
++responsible for initializing this register with an appropriate value
++before execution begins.
++
+ @item -mprioritize-restricted-insns=@var{priority}
+ @opindex mprioritize-restricted-insns
+ This option controls the priority that is assigned to
+--
+1.7.2.2
+
diff --git a/4.5.1/gentoo/README.history b/4.5.1/gentoo/README.history
index ef788f6..34e18be 100644
--- a/4.5.1/gentoo/README.history
+++ b/4.5.1/gentoo/README.history
@@ -1,3 +1,6 @@
+1.5 [pending]
+ + 30_all_gcc-4.5-ppc-msingle-pic-base.patch
+
1.4 29.11.2010
U 90_all_gcc-4.5-graphite-ICE.patch
diff --git a/4.5.2/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch b/4.5.2/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
new file mode 100644
index 0000000..217f4f4
--- /dev/null
+++ b/4.5.2/gentoo/30_all_gcc-4.5-ppc-msingle-pic-base.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/347281
+
+backported from gcc-4.6
+
+From aaf90e018802d80e9cd6ba86c6d03aee1456d737 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+Date: Sat, 9 Oct 2010 12:45:39 +0200
+Subject: [PATCH] PowerPC: Add msingle-pic-base option, gcc 4.5.
+
+Do not generate fPIC/fpic prologue nor save
+and restore PIC register.
+
+Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+---
+ gcc/config/rs6000/rs6000.c | 5 +++++
+ gcc/config/rs6000/rs6000.opt | 4 ++++
+ gcc/doc/invoke.texi | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
+index 01e6d71..1552ec1 100644
+--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c
+@@ -18553,8 +18553,10 @@ rs6000_reg_live_or_pic_offset_p (int reg)
+ return ((df_regs_ever_live_p (reg)
+ && (!call_used_regs[reg]
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && TARGET_TOC && TARGET_MINIMAL_TOC)))
+ || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
++ && !TARGET_SINGLE_PIC_BASE
+ && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
+ || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+ }
+@@ -19305,6 +19307,9 @@ rs6000_emit_prologue (void)
+ insn = emit_insn (generate_set_vrsave (reg, info, 0));
+ }
+
++ if (TARGET_SINGLE_PIC_BASE)
++ return; /* Do not set PIC register */
++
+ /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */
+ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
+ || (DEFAULT_ABI == ABI_V4
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 63f0f8c..1c97c94 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -163,6 +163,10 @@ mupdate
+ Target Report RejectNegative InverseMask(NO_UPDATE, UPDATE)
+ Generate load/store with update instructions
+
++msingle-pic-base
++Target Report Var(TARGET_SINGLE_PIC_BASE) Init(0)
++Do not load the PIC register in function prologues
++
+ mavoid-indexed-addresses
+ Target Report Var(TARGET_AVOID_XFORM) Init(-1)
+ Avoid generation of indexed load/store instructions when possible
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index a1846dc..32e17b6 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -765,7 +765,7 @@ See RS/6000 and PowerPC Options.
+ -mstrict-align -mno-strict-align -mrelocatable @gol
+ -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
+ -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
+--mdynamic-no-pic -maltivec -mswdiv @gol
++-mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
+ -mprioritize-restricted-insns=@var{priority} @gol
+ -msched-costly-dep=@var{dependence_type} @gol
+ -minsert-sched-nops=@var{scheme} @gol
+@@ -15221,6 +15221,13 @@ relocatable, but that its external references are relocatable. The
+ resulting code is suitable for applications, but not shared
+ libraries.
+
++@item -msingle-pic-base
++@opindex msingle-pic-base
++Treat the register used for PIC addressing as read-only, rather than
++loading it in the prologue for each function. The run-time system is
++responsible for initializing this register with an appropriate value
++before execution begins.
++
+ @item -mprioritize-restricted-insns=@var{priority}
+ @opindex mprioritize-restricted-insns
+ This option controls the priority that is assigned to
+--
+1.7.2.2
+
diff --git a/4.5.2/gentoo/README.history b/4.5.2/gentoo/README.history
index 96034c7..db63edf 100644
--- a/4.5.2/gentoo/README.history
+++ b/4.5.2/gentoo/README.history
@@ -1,5 +1,6 @@
-1.2 pending
+1.2 [pending]
+ 24_all_4.5.2_pr43653_clang_ICE.patch
+ + 30_all_gcc-4.5-ppc-msingle-pic-base.patch
1.1 13.02.2011
+ 22_all_4.6_pr45094_arm-dword-move.patch