patches/gcc/4.4.4/110-trampolinewarn.patch
author Remy Bohmer <linux@bohmer.net>
Thu May 27 23:18:19 2010 +0200 (2010-05-27)
changeset 2060 51e4597b07fc
child 2148 ada9128c98b8
permissions -rw-r--r--
scripts: add option to strip all toolchain executables

To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
yann@1948
     1
diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
yann@1948
     2
yann@1948
     3
diff -durN gcc-4.4.4.orig/gcc/builtins.c gcc-4.4.4/gcc/builtins.c
yann@1948
     4
--- gcc-4.4.4.orig/gcc/builtins.c	2010-03-22 16:00:20.000000000 +0100
yann@1948
     5
+++ gcc-4.4.4/gcc/builtins.c	2010-05-16 19:10:34.000000000 +0200
yann@1948
     6
@@ -5783,6 +5783,9 @@
yann@1948
     7
   trampolines_created = 1;
yann@1948
     8
   INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
yann@1948
     9
 
yann@1948
    10
+  if (warn_trampolines)
yann@1948
    11
+    warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
yann@1948
    12
+
yann@1948
    13
   return const0_rtx;
yann@1948
    14
 }
yann@1948
    15
 
yann@1948
    16
diff -durN gcc-4.4.4.orig/gcc/common.opt gcc-4.4.4/gcc/common.opt
yann@1948
    17
--- gcc-4.4.4.orig/gcc/common.opt	2009-03-28 18:28:45.000000000 +0100
yann@1948
    18
+++ gcc-4.4.4/gcc/common.opt	2010-05-16 19:10:34.000000000 +0200
yann@1948
    19
@@ -197,6 +197,10 @@
yann@1948
    20
 Common Var(warn_type_limits) Init(-1) Warning
yann@1948
    21
 Warn if a comparison is always true or always false due to the limited range of the data type
yann@1948
    22
 
yann@1948
    23
+Wtrampolines
yann@1948
    24
+Common Var(warn_trampolines) Init(1)
yann@1948
    25
+Warn whenever a trampoline is generated
yann@1948
    26
+
yann@1948
    27
 Wuninitialized
yann@1948
    28
 Common Var(warn_uninitialized) Warning
yann@1948
    29
 Warn about uninitialized automatic variables