Patchwork [google/main] Add -fno-section-anchors for powerpc, workround for Google ref b/6663281 (issue6443071)

login
register
mail settings
Submitter Simon Baldwin
Date Aug. 1, 2012, 10:49 a.m.
Message ID <20120801104909.8801CA0F3B@xoom.chi.corp.google.com>
Download mbox | patch
Permalink /patch/174434/
State New
Headers show

Comments

Simon Baldwin - Aug. 1, 2012, 10:49 a.m.
Workround for Google ref b/6663281

Appends -fno-section-anchors to -fprofile-{generate,use} -fripa, for powerpc
targets only.  No-op for other targets.

For google/main.  Tested for bootstrap and regression.

2012-08-01  Simon Baldwin  <simonb@google.com>

	* gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp: Append
	-fno-section-anchors to profile_option and feedback_option for
	powerpc targets.  Workround for Google ref b/6663281.
	* gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp: Likewise



--
This patch is available for review at http://codereview.appspot.com/6443071
Diego Novillo - Aug. 1, 2012, 1:55 p.m.
On 12-08-01 03:49 , Simon Baldwin wrote:
> Workround for Google ref b/6663281
>
> Appends -fno-section-anchors to -fprofile-{generate,use} -fripa, for powerpc
> targets only.  No-op for other targets.
>
> For google/main.  Tested for bootstrap and regression.
>
> 2012-08-01  Simon Baldwin  <simonb@google.com>
>
> 	* gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp: Append
> 	-fno-section-anchors to profile_option and feedback_option for
> 	powerpc targets.  Workround for Google ref b/6663281.
> 	* gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp: Likewise

OK.


Diego.

Patch

Index: gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp
===================================================================
--- gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp	(revision 190013)
+++ gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp	(working copy)
@@ -45,6 +45,12 @@  load_lib profopt.exp
 set profile_option "-fprofile-generate -fripa -D_PROFILE_GENERATE"
 set feedback_option "-fprofile-use -fripa -D_PROFILE_USE"
 
+# Add -fno-section-anchors for powerpc.  Workround for Google ref b/6663281
+if {[istarget powerpc*-*-*]} {
+    set profile_option "$profile_option -fno-section-anchors"
+    set feedback_option "$feedback_option -fno-section-anchors"
+}
+
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.c]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $src] then {
Index: gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp
===================================================================
--- gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp	(revision 190013)
+++ gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp	(working copy)
@@ -45,6 +45,12 @@  load_lib profopt.exp
 set profile_option "-fprofile-generate -fripa"
 set feedback_option "-fprofile-use -fripa"
 
+# Add -fno-section-anchors for powerpc.  Workround for Google ref b/6663281
+if {[istarget powerpc*-*-*]} {
+    set profile_option "$profile_option -fno-section-anchors"
+    set feedback_option "$feedback_option -fno-section-anchors"
+}
+
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.C]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $src] then {