thomas@1461: Original patch from: ../4.3.2/110-trampolinewarn.patch thomas@1461: thomas@1461: -= BEGIN original header =- thomas@1461: Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/00_all_gcc-trampolinewarn.patch thomas@1461: This trivial patch causes gcc to emit a warning whenever thomas@1461: it generates a trampoline. These are otherwise hard to thomas@1461: locate. It is rigged to default ON - to have it default thomas@1461: to OFF remove the text 'Init(1)' from the common.opt thomas@1461: patch, leaving just 'Common Var(warn_trampolines)'. thomas@1461: Kevin F. Quinn 17 Jan 2006 thomas@1461: thomas@1461: -= END original header =- thomas@1461: thomas@1461: diff -durN gcc-4.3.3.orig/gcc/builtins.c gcc-4.3.3/gcc/builtins.c thomas@1461: --- gcc-4.3.3.orig/gcc/builtins.c 2008-08-19 18:37:13.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/builtins.c 2009-01-27 22:19:12.000000000 +0100 thomas@1461: @@ -5662,6 +5662,9 @@ thomas@1461: trampolines_created = 1; thomas@1461: INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain); thomas@1461: thomas@1461: + if (warn_trampolines) thomas@1461: + warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); thomas@1461: + thomas@1461: return const0_rtx; thomas@1461: } thomas@1461: thomas@1461: diff -durN gcc-4.3.3.orig/gcc/common.opt gcc-4.3.3/gcc/common.opt thomas@1461: --- gcc-4.3.3.orig/gcc/common.opt 2008-01-22 15:11:44.000000000 +0100 thomas@1461: +++ gcc-4.3.3/gcc/common.opt 2009-01-27 22:19:12.000000000 +0100 thomas@1461: @@ -182,6 +182,10 @@ thomas@1461: Common Var(warn_system_headers) Warning thomas@1461: Do not suppress warnings from system headers thomas@1461: thomas@1461: +Wtrampolines thomas@1461: +Common Var(warn_trampolines) Init(1) thomas@1461: +Warn whenever a trampoline is generated thomas@1461: + thomas@1461: Wuninitialized thomas@1461: Common Var(warn_uninitialized) Warning thomas@1461: Warn about uninitialized automatic variables