aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-03-28 03:01:22 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-03-28 03:01:22 -0500
commitf260a7f562cfefb8097041a1458c97b4859f2900 (patch)
treed8569d91ff478ac01b59dd37c90eaecdcd4082c6 /main/gcc/09_all_gcc-4.5-Wtrampolines.patch
parent483bab0868b4286248a3f8ff6ea817fdeb993356 (diff)
downloadaports-f260a7f562cfefb8097041a1458c97b4859f2900.tar.bz2
aports-f260a7f562cfefb8097041a1458c97b4859f2900.tar.xz
Revert "main/gcc: upgrade to 4.6.0"
Too many issues before freeze to be system compiler. This reverts commit 747f87be523e41dc48e026c813b013e30334f79f.
Diffstat (limited to 'main/gcc/09_all_gcc-4.5-Wtrampolines.patch')
-rw-r--r--main/gcc/09_all_gcc-4.5-Wtrampolines.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
new file mode 100644
index 0000000000..9c95c1e940
--- /dev/null
+++ b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
@@ -0,0 +1,64 @@
+2010-07-15 Magnus Granberg <zorry@gentoo.org>
+ Kevin F. Quinn <kevquinn@gentoo.org>
+
+ * builtins.c (expand_builtin_init_trampoline): If
+ -Wtrampolines make a warning.
+ * common.opt: Add -Wtrampolines.
+ * doc/invoke.texi: Add -Wtrampolines.
+
+2010-07-31 Magnus Granberg <zorry@gentoo.org>
+
+ #328451 set -Wtrampolines as default
+
+http://gcc.gnu.org/viewcvs?view=revision&revision=162205
+
+--- a/gcc/builtins.c
++++ b/gcc/builtins.c
+@@ -5155,6 +5155,10 @@ expand_builtin_init_trampoline (tree exp)
+ targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
+
+ trampolines_created = 1;
++
++ warning_at (DECL_SOURCE_LOCATION (t_func), OPT_Wtrampolines,
++ "trampoline generated for nested function %qD", t_func);
++
+ return const0_rtx;
+ }
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -192,6 +192,10 @@ Wsystem-headers
+ Common Var(warn_system_headers) Warning
+ Do not suppress warnings from system headers
+
++Wtrampolines
++Common Var(warn_trampolines) Init(1) Warning
++Warn whenever a trampoline is generated
++
+ Wtype-limits
+ Common Var(warn_type_limits) Init(-1) Warning
+ Warn if a comparison is always true or always false due to the limited range of the data type
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -3611,6 +3611,21 @@ code. However, note that using @option{-Wall} in conjunction with this
+ option will @emph{not} warn about unknown pragmas in system
+ headers---for that, @option{-Wunknown-pragmas} must also be used.
+
++@item -Wtrampolines
++@opindex Wtrampolines
++@opindex Wno-trampolines
++ Warn about trampolines generated for pointers to nested functions.
++
++ NOTE: In Gentoo, @option{-Wtrampolines} is set by default.
++ To disable, specify @option{-Wno-trampolines}
++
++ A trampoline is a small piece of data or code that is created at run
++ time on the stack when the address of a nested function is taken, and
++ is used to call the nested function indirectly. For some targets, it
++ is made up of data only and thus requires no special treatment. But,
++ for most targets, it is made up of code and thus requires the stack
++ to be made executable in order for the program to work properly.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal