patches/gcc/4.3.0/125-trampolinewarn.patch
changeset 747 d3e603e7c17c
parent 746 b150d6f590fc
child 748 61cd4eb6034d
     1.1 --- a/patches/gcc/4.3.0/125-trampolinewarn.patch	Mon Jul 28 21:08:01 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,35 +0,0 @@
     1.4 -Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/00_all_gcc-trampolinewarn.patch
     1.5 -	This trivial patch causes gcc to emit a warning whenever
     1.6 -	it generates a trampoline.  These are otherwise hard to
     1.7 -	locate.  It is rigged to default ON - to have it default
     1.8 -	to OFF remove the text 'Init(1)' from the common.opt
     1.9 -	patch, leaving just 'Common Var(warn_trampolines)'.
    1.10 -	Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006
    1.11 -
    1.12 -diff -durN gcc-4.3.0.orig/gcc/builtins.c gcc-4.3.0/gcc/builtins.c
    1.13 ---- gcc-4.3.0.orig/gcc/builtins.c	2008-02-20 18:27:21.000000000 +0100
    1.14 -+++ gcc-4.3.0/gcc/builtins.c	2008-06-10 14:44:10.000000000 +0200
    1.15 -@@ -5659,6 +5659,9 @@
    1.16 -   trampolines_created = 1;
    1.17 -   INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
    1.18 - 
    1.19 -+  if (warn_trampolines)
    1.20 -+    warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
    1.21 -+
    1.22 -   return const0_rtx;
    1.23 - }
    1.24 - 
    1.25 -diff -durN gcc-4.3.0.orig/gcc/common.opt gcc-4.3.0/gcc/common.opt
    1.26 ---- gcc-4.3.0.orig/gcc/common.opt	2008-01-22 15:11:44.000000000 +0100
    1.27 -+++ gcc-4.3.0/gcc/common.opt	2008-06-10 14:44:10.000000000 +0200
    1.28 -@@ -182,6 +182,10 @@
    1.29 - Common Var(warn_system_headers) Warning
    1.30 - Do not suppress warnings from system headers
    1.31 - 
    1.32 -+Wtrampolines
    1.33 -+Common Var(warn_trampolines) Init(1)
    1.34 -+Warn whenever a trampoline is generated
    1.35 -+
    1.36 - Wuninitialized
    1.37 - Common Var(warn_uninitialized) Warning
    1.38 - Warn about uninitialized automatic variables