summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-11-08 08:30:41 -0800
committerSaul Wold <Saul.Wold@intel.com>2010-11-18 13:30:25 -0800
commitb1dd356f5eab11fa6fc18013189e51c13fdd763b (patch)
treea1c8e13223ea108b88507c35dfdf0c1b9d6f1edb /meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
parentcaf8fe37496f49ed920036ac8763ec56b0029570 (diff)
downloadpoky-b1dd356f5eab11fa6fc18013189e51c13fdd763b.tar.gz
gcc: upgrade from 4.5.0 to 4.5.1
Removed these patches which are not needed anymore. gcc-4.5.0_to_svn_162697.patch.bz2 : All the commits in this patch is part of the 4.5.1 branch. So moving to 4.5.1 makes this patch obsolete gcc_revert_base_version_to_4.5.0.patch: moving to 4.5.1 removes need of this patch gcc-pr43698-arm-rev-instr.patch: upstream has this fix. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch201
1 files changed, 0 insertions, 201 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
deleted file mode 100644
index 04043ff0b7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,201 +0,0 @@
1 gcc/
2 2008-07-02 Joseph Myers <joseph@codesourcery.com>
3 * c-incpath.c: Include toplev.h.
4 (merge_include_chains): Use warning instead of cpp_error for
5 system directory poisoning diagnostic.
6 * Makefile.in (c-incpath.o): Depend on toplev.h.
7 * gcc.c (LINK_COMMAND_SPEC): Pass
8 --error-poison-system-directories if
9 -Werror=poison-system-directories.
10
11 2007-06-13 Joseph Myers <joseph@codesourcery.com>
12 * common.opt (--Wno-poison-system-directories): New.
13 * doc/invoke.texi (-Wno-poison-system-directories): Document.
14 * c-incpath.c: Include flags.h.
15 (merge_include_chains): Check flag_poison_system_directories.
16 * gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories
17 to linker if -Wno-poison-system-directories.
18 * Makefile.in (c-incpath.o): Depend on $(FLAGS_H).
19
20 2007-03-20 Daniel Jacobowitz <dan@codesourcery.com>
21 Joseph Myers <joseph@codesourcery.com>
22 * configure.ac (--enable-poison-system-directories): New option.
23 * configure, config.in: Regenerate.
24 * c-incpath.c (merge_include_chains): If
25 ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of
26 /usr/include, /usr/local/include or /usr/X11R6/include.
27
28Index: gcc-4.5.0/gcc/common.opt
29===================================================================
30--- gcc-4.5.0.orig/gcc/common.opt 2010-03-17 20:01:09.000000000 -0700
31+++ gcc-4.5.0/gcc/common.opt 2010-06-25 11:35:39.965383734 -0700
32@@ -152,6 +152,10 @@
33 Common Var(warn_padded) Warning
34 Warn when padding is required to align structure members
35
36+Wpoison-system-directories
37+Common Var(flag_poison_system_directories) Init(1) Warning
38+Warn for -I and -L options using system directories if cross compiling
39+
40 Wshadow
41 Common Var(warn_shadow) Warning
42 Warn when one local variable shadows another
43Index: gcc-4.5.0/gcc/config.in
44===================================================================
45--- gcc-4.5.0.orig/gcc/config.in 2010-04-14 02:30:07.000000000 -0700
46+++ gcc-4.5.0/gcc/config.in 2010-06-25 11:35:39.969383588 -0700
47@@ -132,6 +132,12 @@
48 #endif
49
50
51+/* Define to warn for use of native system header directories */
52+#ifndef USED_FOR_TARGET
53+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
54+#endif
55+
56+
57 /* Define if you want all operations on RTL (the basic data structure of the
58 optimizer and back end) to be checked for dynamic type safety at runtime.
59 This is quite expensive. */
60Index: gcc-4.5.0/gcc/configure.ac
61===================================================================
62--- gcc-4.5.0.orig/gcc/configure.ac 2010-06-25 11:34:01.433382161 -0700
63+++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:35:39.969383588 -0700
64@@ -4276,6 +4276,16 @@
65 fi)
66 AC_SUBST(slibdir)
67
68+AC_ARG_ENABLE([poison-system-directories],
69+ AS_HELP_STRING([--enable-poison-system-directories],
70+ [warn for use of native system header directories]),,
71+ [enable_poison_system_directories=no])
72+if test "x${enable_poison_system_directories}" = "xyes"; then
73+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
74+ [1],
75+ [Define to warn for use of native system header directories])
76+fi
77+
78 # Substitute configuration variables
79 AC_SUBST(subdirs)
80 AC_SUBST(srcdir)
81Index: gcc-4.5.0/gcc/doc/invoke.texi
82===================================================================
83--- gcc-4.5.0.orig/gcc/doc/invoke.texi 2010-04-06 07:02:22.000000000 -0700
84+++ gcc-4.5.0/gcc/doc/invoke.texi 2010-06-25 11:35:39.992666345 -0700
85@@ -252,6 +252,7 @@
86 -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
87 -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
88 -Wpointer-arith -Wno-pointer-to-int-cast @gol
89+-Wno-poison-system-directories @gol
90 -Wredundant-decls @gol
91 -Wreturn-type -Wsequence-point -Wshadow @gol
92 -Wsign-compare -Wsign-conversion -Wstack-protector @gol
93@@ -3603,6 +3604,14 @@
94 option will @emph{not} warn about unknown pragmas in system
95 headers---for that, @option{-Wunknown-pragmas} must also be used.
96
97+@item -Wno-poison-system-directories
98+@opindex Wno-poison-system-directories
99+Do not warn for @option{-I} or @option{-L} options using system
100+directories such as @file{/usr/include} when cross compiling. This
101+option is intended for use in chroot environments when such
102+directories contain the correct headers and libraries for the target
103+system rather than the host.
104+
105 @item -Wfloat-equal
106 @opindex Wfloat-equal
107 @opindex Wno-float-equal
108Index: gcc-4.5.0/gcc/gcc.c
109===================================================================
110--- gcc-4.5.0.orig/gcc/gcc.c 2010-02-11 04:23:08.000000000 -0800
111+++ gcc-4.5.0/gcc/gcc.c 2010-06-25 11:35:40.009381858 -0700
112@@ -792,6 +792,8 @@
113 %{flto} %{fwhopr} %l " LINK_PIE_SPEC \
114 "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
115 %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
116+ %{Wno-poison-system-directories:--no-poison-system-directories}\
117+ %{Werror=poison-system-directories:--error-poison-system-directories}\
118 %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
119 %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
120 %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
121Index: gcc-4.5.0/gcc/incpath.c
122===================================================================
123--- gcc-4.5.0.orig/gcc/incpath.c 2009-11-25 02:55:54.000000000 -0800
124+++ gcc-4.5.0/gcc/incpath.c 2010-06-25 11:35:40.017209818 -0700
125@@ -353,6 +353,24 @@
126 }
127 fprintf (stderr, _("End of search list.\n"));
128 }
129+
130+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
131+ if (flag_poison_system_directories)
132+ {
133+ struct cpp_dir *p;
134+
135+ for (p = heads[QUOTE]; p; p = p->next)
136+ {
137+ if ((!strncmp (p->name, "/usr/include", 12))
138+ || (!strncmp (p->name, "/usr/local/include", 18))
139+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
140+ warning (OPT_Wpoison_system_directories,
141+ "include location \"%s\" is unsafe for "
142+ "cross-compilation",
143+ p->name);
144+ }
145+ }
146+#endif
147 }
148
149 /* Use given -I paths for #include "..." but not #include <...>, and
150diff -ur gcc-4.5.0.orig/gcc/Makefile.in gcc-4.5.0/gcc/Makefile.in
151--- gcc-4.5.0.orig/gcc/Makefile.in 2010-09-29 17:13:49.164088845 -0500
152+++ gcc-4.5.0/gcc/Makefile.in 2010-09-29 18:48:19.300178501 -0500
153@@ -1965,7 +1965,7 @@
154
155 incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
156 intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
157- $(MACHMODE_H)
158+ $(MACHMODE_H) $(FLAGS_H) toplev.h
159
160 c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
161 $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
162diff -ur gcc-4.5.0.orig/gcc/configure gcc-4.5.0/gcc/configure
163--- gcc-4.5.0.orig/gcc/configure 2010-09-29 14:58:31.702054881 -0500
164+++ gcc-4.5.0/gcc/configure 2010-09-29 18:46:31.486068500 -0500
165@@ -913,6 +913,7 @@
166 enable_maintainer_mode
167 enable_version_specific_runtime_libs
168 with_slibdir
169+enable_poison_system_directories
170 enable_plugin
171 enable_target_optspace
172 '
173@@ -1621,6 +1622,8 @@
174 --enable-version-specific-runtime-libs
175 specify that runtime libraries should be
176 installed in a compiler-specific directory
177+ --enable-poison-system-directories
178+ warn for use of native system header directories
179 --enable-plugin enable plugin support
180
181 Optional Packages:
182@@ -25339,6 +25377,19 @@
183
184
185
186+# Check whether --enable-poison-system-directories was given.
187+if test "${enable_poison_system_directories+set}" = set; then :
188+ enableval=$enable_poison_system_directories;
189+else
190+ enable_poison_system_directories=no
191+fi
192+
193+if test "x${enable_poison_system_directories}" = "xyes"; then
194+
195+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
196+
197+fi
198+
199 # Substitute configuration variables
200
201