summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:03:58 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:12:02 +0100
commitbe10a6b1321f250b1034c7d9d0a8ef18b296eef1 (patch)
tree9249025cbfbfbee4cc430d62b27f75301dd4dfde /recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch
parent93b28937ac67ba46d65f55637e42552e224aa7e2 (diff)
downloadmeta-openembedded-be10a6b1321f250b1034c7d9d0a8ef18b296eef1.tar.gz
angstrom-layers: meta-openembedded: replace poky gcc 4.5 sources with OE ones
This needs further investigation, but for now we can get the tested sources into the poky gcc harness Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch')
-rw-r--r--recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch207
1 files changed, 207 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch
new file mode 100644
index 0000000000..bff745dae0
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99297.patch
@@ -0,0 +1,207 @@
12010-06-28 Julian Brown <julian@codesourcery.com>
2
3 Merge from Sourcery G++ 4.4:
4
5 Daniel Jacobowitz <dan@codesourcery.com>
6 Joseph Myers <joseph@codesourcery.com>
7
8 gcc/
9 * doc/invoke.texi (-Wno-poison-system-directories): Document.
10 * gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories
11 if -Wno-poison-system-directories and --error-poison-system-directories
12 if -Werror=poison-system-directories to linker.
13 * incpath.c: Include flags.h. Include toplev.h.
14 (merge_include_chains): If ENABLE_POISON_SYSTEM_DIRECTORIES defined
15 and flag_poison_system_directories is true, warn for use of
16 /usr/include, /usr/local/include or /usr/X11R6/include.
17 * Makefile.in (incpath.o): Depend on $(FLAGS_H) and toplev.h.
18 * common.opt (--Wno-poison-system-directories): New.
19 * configure.ac (--enable-poison-system-directories): New option.
20 * configure: Regenerate.
21 * config.in: Regenerate.
22
23Index: gcc-4.5/gcc/Makefile.in
24===================================================================
25--- gcc-4.5.orig/gcc/Makefile.in 2010-09-23 16:44:12.000000000 -0700
26+++ gcc-4.5/gcc/Makefile.in 2010-09-23 16:46:33.552416860 -0700
27@@ -1969,7 +1969,7 @@ gcc.srcextra: gengtype-lex.c
28
29 incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
30 intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
31- $(MACHMODE_H)
32+ $(MACHMODE_H) $(FLAGS_H) toplev.h
33
34 c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
35 $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
36Index: gcc-4.5/gcc/common.opt
37===================================================================
38--- gcc-4.5.orig/gcc/common.opt 2010-07-11 16:14:47.000000000 -0700
39+++ gcc-4.5/gcc/common.opt 2010-09-23 16:46:33.556418045 -0700
40@@ -152,6 +152,10 @@ Wpadded
41 Common Var(warn_padded) Warning
42 Warn when padding is required to align structure members
43
44+Wpoison-system-directories
45+Common Var(flag_poison_system_directories) Init(1)
46+Warn for -I and -L options using system directories if cross compiling
47+
48 Wshadow
49 Common Var(warn_shadow) Warning
50 Warn when one local variable shadows another
51Index: gcc-4.5/gcc/config.in
52===================================================================
53--- gcc-4.5.orig/gcc/config.in 2010-07-11 16:14:46.000000000 -0700
54+++ gcc-4.5/gcc/config.in 2010-09-23 16:46:33.556418045 -0700
55@@ -132,6 +132,12 @@
56 #endif
57
58
59+/* Define to warn for use of native system header directories */
60+#ifndef USED_FOR_TARGET
61+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
62+#endif
63+
64+
65 /* Define if you want all operations on RTL (the basic data structure of the
66 optimizer and back end) to be checked for dynamic type safety at runtime.
67 This is quite expensive. */
68Index: gcc-4.5/gcc/configure
69===================================================================
70--- gcc-4.5.orig/gcc/configure 2010-09-23 16:44:11.000000000 -0700
71+++ gcc-4.5/gcc/configure 2010-09-23 16:46:33.572415719 -0700
72@@ -913,6 +913,7 @@ with_system_zlib
73 enable_maintainer_mode
74 enable_version_specific_runtime_libs
75 with_slibdir
76+enable_poison_system_directories
77 enable_plugin
78 '
79 ac_precious_vars='build_alias
80@@ -1620,6 +1621,8 @@ Optional Features:
81 --enable-version-specific-runtime-libs
82 specify that runtime libraries should be
83 installed in a compiler-specific directory
84+ --enable-poison-system-directories
85+ warn for use of native system header directories
86 --enable-plugin enable plugin support
87
88 Optional Packages:
89@@ -25345,6 +25348,19 @@ fi
90
91
92
93+# Check whether --enable-poison-system-directories was given.
94+if test "${enable_poison_system_directories+set}" = set; then :
95+ enableval=$enable_poison_system_directories;
96+else
97+ enable_poison_system_directories=no
98+fi
99+
100+if test "x${enable_poison_system_directories}" = "xyes"; then
101+
102+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
103+
104+fi
105+
106 # Substitute configuration variables
107
108
109Index: gcc-4.5/gcc/configure.ac
110===================================================================
111--- gcc-4.5.orig/gcc/configure.ac 2010-09-23 16:44:11.000000000 -0700
112+++ gcc-4.5/gcc/configure.ac 2010-09-23 16:46:33.576417624 -0700
113@@ -4439,6 +4439,16 @@ else
114 fi)
115 AC_SUBST(slibdir)
116
117+AC_ARG_ENABLE([poison-system-directories],
118+ AS_HELP_STRING([--enable-poison-system-directories],
119+ [warn for use of native system header directories]),,
120+ [enable_poison_system_directories=no])
121+if test "x${enable_poison_system_directories}" = "xyes"; then
122+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
123+ [1],
124+ [Define to warn for use of native system header directories])
125+fi
126+
127 # Substitute configuration variables
128 AC_SUBST(subdirs)
129 AC_SUBST(srcdir)
130Index: gcc-4.5/gcc/doc/invoke.texi
131===================================================================
132--- gcc-4.5.orig/gcc/doc/invoke.texi 2010-09-23 15:33:28.000000000 -0700
133+++ gcc-4.5/gcc/doc/invoke.texi 2010-09-23 16:46:33.584416934 -0700
134@@ -252,6 +252,7 @@ Objective-C and Objective-C++ Dialects}.
135 -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
136 -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
137 -Wpointer-arith -Wno-pointer-to-int-cast @gol
138+-Wno-poison-system-directories @gol
139 -Wredundant-decls @gol
140 -Wreturn-type -Wsequence-point -Wshadow @gol
141 -Wsign-compare -Wsign-conversion -Wstack-protector @gol
142@@ -3603,6 +3604,14 @@ code. However, note that using @option{
143 option will @emph{not} warn about unknown pragmas in system
144 headers---for that, @option{-Wunknown-pragmas} must also be used.
145
146+@item -Wno-poison-system-directories
147+@opindex Wno-poison-system-directories
148+Do not warn for @option{-I} or @option{-L} options using system
149+directories such as @file{/usr/include} when cross compiling. This
150+option is intended for use in chroot environments when such
151+directories contain the correct headers and libraries for the target
152+system rather than the host.
153+
154 @item -Wfloat-equal
155 @opindex Wfloat-equal
156 @opindex Wno-float-equal
157Index: gcc-4.5/gcc/gcc.c
158===================================================================
159--- gcc-4.5.orig/gcc/gcc.c 2010-07-11 16:14:46.000000000 -0700
160+++ gcc-4.5/gcc/gcc.c 2010-09-23 16:46:33.588417920 -0700
161@@ -792,6 +792,8 @@ proper position among the other output f
162 %{flto} %{fwhopr} %l " LINK_PIE_SPEC \
163 "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
164 %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
165+ %{Wno-poison-system-directories:--no-poison-system-directories}\
166+ %{Werror=poison-system-directories:--error-poison-system-directories}\
167 %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
168 %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
169 %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
170Index: gcc-4.5/gcc/incpath.c
171===================================================================
172--- gcc-4.5.orig/gcc/incpath.c 2010-07-11 16:14:44.000000000 -0700
173+++ gcc-4.5/gcc/incpath.c 2010-09-23 16:46:33.588417920 -0700
174@@ -30,6 +30,8 @@
175 #include "intl.h"
176 #include "incpath.h"
177 #include "cppdefault.h"
178+#include "flags.h"
179+#include "toplev.h"
180
181 /* Microsoft Windows does not natively support inodes.
182 VMS has non-numeric inodes. */
183@@ -353,6 +355,24 @@ merge_include_chains (const char *sysroo
184 }
185 fprintf (stderr, _("End of search list.\n"));
186 }
187+
188+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
189+ if (flag_poison_system_directories)
190+ {
191+ struct cpp_dir *p;
192+
193+ for (p = heads[QUOTE]; p; p = p->next)
194+ {
195+ if ((!strncmp (p->name, "/usr/include", 12))
196+ || (!strncmp (p->name, "/usr/local/include", 18))
197+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
198+ warning (OPT_Wpoison_system_directories,
199+ "include location \"%s\" is unsafe for "
200+ "cross-compilation",
201+ p->name);
202+ }
203+ }
204+#endif
205 }
206
207 /* Use given -I paths for #include "..." but not #include <...>, and