diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-19 21:27:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-28 10:44:21 +0100 |
commit | 3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea (patch) | |
tree | 66743557d4203b019988970a6fa3ac603c06c991 /meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch | |
parent | 07a6bec75c59fec06d0947ada708482900bf067a (diff) | |
download | poky-3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea.tar.gz |
gcc: Add recipes for 4.6.0
This is initial set of patches for testing them out
The patches need documentation is pending
Some patches especially uclibc related are not
needed they must be dropped.
(From OE-Core rev: 26858099bc104efc3b3d15d9298018285c551b9a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch new file mode 100644 index 0000000000..f132fbf3e5 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/optional_libstdc.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ | ||
2 | will not run correctly since by default the linker will try to link against libstdc++ | ||
3 | which shouldn't exist yet. We need an option to disable -lstdc++ | ||
4 | option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc | ||
5 | driver. This patch adds such an option which only disables the -lstdc++. | ||
6 | |||
7 | A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to | ||
8 | do this officially, the likely answer is don't build libstdc++ separately. | ||
9 | |||
10 | RP 29/6/10 | ||
11 | |||
12 | Index: gcc-4.6.0/gcc/cp/g++spec.c | ||
13 | =================================================================== | ||
14 | --- gcc-4.6.0.orig/gcc/cp/g++spec.c | ||
15 | +++ gcc-4.6.0/gcc/cp/g++spec.c | ||
16 | @@ -127,6 +127,7 @@ lang_specific_driver (struct cl_decoded_ | ||
17 | switch (decoded_options[i].opt_index) | ||
18 | { | ||
19 | case OPT_nostdlib: | ||
20 | + case OPT_nostdlib__: | ||
21 | case OPT_nodefaultlibs: | ||
22 | library = -1; | ||
23 | break; | ||
24 | Index: gcc-4.6.0/gcc/doc/invoke.texi | ||
25 | =================================================================== | ||
26 | --- gcc-4.6.0.orig/gcc/doc/invoke.texi | ||
27 | +++ gcc-4.6.0/gcc/doc/invoke.texi | ||
28 | @@ -193,7 +193,7 @@ in the following sections. | ||
29 | -fno-pretty-templates @gol | ||
30 | -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol | ||
31 | -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol | ||
32 | --fno-default-inline -fvisibility-inlines-hidden @gol | ||
33 | +-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol | ||
34 | -fvisibility-ms-compat @gol | ||
35 | -Wabi -Wconversion-null -Wctor-dtor-privacy @gol | ||
36 | -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol | ||
37 | @@ -431,7 +431,7 @@ Objective-C and Objective-C++ Dialects}. | ||
38 | @gccoptlist{@var{object-file-name} -l@var{library} @gol | ||
39 | -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol | ||
40 | -s -static -static-libgcc -static-libstdc++ -shared @gol | ||
41 | --shared-libgcc -symbolic @gol | ||
42 | +-shared-libgcc -symbolic -nostdlib++ @gol | ||
43 | -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol | ||
44 | -u @var{symbol}} | ||
45 | |||
46 | @@ -9069,6 +9069,11 @@ These entries are usually resolved by en | ||
47 | libc. These entry points should be supplied through some other | ||
48 | mechanism when this option is specified. | ||
49 | |||
50 | +@item -nostdlib++ | ||
51 | +@opindex nostdlib++ | ||
52 | +Do not use the standard system C++ runtime libraries when linking. | ||
53 | +Only the libraries you specify will be passed to the linker. | ||
54 | + | ||
55 | @cindex @option{-lgcc}, use with @option{-nostdlib} | ||
56 | @cindex @option{-nostdlib} and unresolved references | ||
57 | @cindex unresolved references and @option{-nostdlib} | ||
58 | Index: gcc-4.6.0/gcc/c-family/c.opt | ||
59 | =================================================================== | ||
60 | --- gcc-4.6.0.orig/gcc/c-family/c.opt | ||
61 | +++ gcc-4.6.0/gcc/c-family/c.opt | ||
62 | @@ -1111,6 +1111,10 @@ nostdinc++ | ||
63 | C++ ObjC++ | ||
64 | Do not search standard system include directories for C++ | ||
65 | |||
66 | +nostdlib++ | ||
67 | +Driver | ||
68 | +Do not link standard C++ runtime library | ||
69 | + | ||
70 | o | ||
71 | C ObjC C++ ObjC++ Joined Separate | ||
72 | ; Documented in common.opt | ||
73 | Index: gcc-4.6.0/gcc/gcc.c | ||
74 | =================================================================== | ||
75 | --- gcc-4.6.0.orig/gcc/gcc.c | ||
76 | +++ gcc-4.6.0/gcc/gcc.c | ||
77 | @@ -666,6 +666,7 @@ proper position among the other output f | ||
78 | %(mflib) " STACK_SPLIT_SPEC "\ | ||
79 | %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ | ||
80 | %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ | ||
81 | + %{!nostdlib++:}\ | ||
82 | %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" | ||
83 | #endif | ||
84 | |||