diff options
| author | Khem Raj <raj.khem@gmail.com> | 2015-05-06 00:04:55 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-09 22:26:44 +0100 |
| commit | 9ba0bf8b6af6626bd3b6d1558959a83b5c14d501 (patch) | |
| tree | 246997127b81791bed0a639feea1f5acea13c9fe /meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch | |
| parent | a28371be8bbdf29eb2f9c4fc68ff26d9d24631ac (diff) | |
| download | poky-9ba0bf8b6af6626bd3b6d1558959a83b5c14d501.tar.gz | |
gcc: Add 5 recipes
Drop backports obviously
additionally drop local patches around
parallel compilation since it got reworked upstream
To select set
GCCVERSION = "5.1%"
SDKGCCVERSION = "5.1%"
in local.conf
Change-Id: Icdfa61017a617244128f361b022e7c8f1f9e0610
(From OE-Core rev: 4bc4acc67e5d7b3f27afadeda5710f9ba5f627d2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch new file mode 100644 index 0000000000..374fe43881 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.1/0014-optional-libstdc.patch | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | From d7b42d93d077b2523c26f0dff0b6c44fdfff9d3c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 29 Mar 2013 09:12:56 +0400 | ||
| 4 | Subject: [PATCH 14/35] optional libstdc | ||
| 5 | |||
| 6 | gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ | ||
| 7 | will not run correctly since by default the linker will try to link against libstdc++ | ||
| 8 | which shouldn't exist yet. We need an option to disable -lstdc++ | ||
| 9 | option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc | ||
| 10 | driver. This patch adds such an option which only disables the -lstdc++. | ||
| 11 | |||
| 12 | A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to | ||
| 13 | do this officially, the likely answer is don't build libstdc++ separately. | ||
| 14 | |||
| 15 | RP 29/6/10 | ||
| 16 | |||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | |||
| 19 | Upstream-Status: Inappropriate [embedded specific] | ||
| 20 | --- | ||
| 21 | gcc/c-family/c.opt | 4 ++++ | ||
| 22 | gcc/cp/g++spec.c | 1 + | ||
| 23 | gcc/doc/invoke.texi | 8 +++++++- | ||
| 24 | gcc/gcc.c | 1 + | ||
| 25 | 4 files changed, 13 insertions(+), 1 deletion(-) | ||
| 26 | |||
| 27 | diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt | ||
| 28 | index 983f4a8..96924f6 100644 | ||
| 29 | --- a/gcc/c-family/c.opt | ||
| 30 | +++ b/gcc/c-family/c.opt | ||
| 31 | @@ -1543,6 +1543,10 @@ nostdinc++ | ||
| 32 | C++ ObjC++ | ||
| 33 | Do not search standard system include directories for C++ | ||
| 34 | |||
| 35 | +nostdlib++ | ||
| 36 | +Driver | ||
| 37 | +Do not link standard C++ runtime library | ||
| 38 | + | ||
| 39 | o | ||
| 40 | C ObjC C++ ObjC++ Joined Separate | ||
| 41 | ; Documented in common.opt | ||
| 42 | diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c | ||
| 43 | index 6536d7e..f57a5d4 100644 | ||
| 44 | --- a/gcc/cp/g++spec.c | ||
| 45 | +++ b/gcc/cp/g++spec.c | ||
| 46 | @@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, | ||
| 47 | switch (decoded_options[i].opt_index) | ||
| 48 | { | ||
| 49 | case OPT_nostdlib: | ||
| 50 | + case OPT_nostdlib__: | ||
| 51 | case OPT_nodefaultlibs: | ||
| 52 | library = -1; | ||
| 53 | break; | ||
| 54 | diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi | ||
| 55 | index 0df8a47..73856d0 100644 | ||
| 56 | --- a/gcc/doc/invoke.texi | ||
| 57 | +++ b/gcc/doc/invoke.texi | ||
| 58 | @@ -195,6 +195,7 @@ in the following sections. | ||
| 59 | -fvisibility-inlines-hidden @gol | ||
| 60 | -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol | ||
| 61 | -fvtv-counts -fvtv-debug @gol | ||
| 62 | +-nostdlib++ @gol | ||
| 63 | -fvisibility-ms-compat @gol | ||
| 64 | -fext-numeric-literals @gol | ||
| 65 | -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol | ||
| 66 | @@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}. | ||
| 67 | -s -static -static-libgcc -static-libstdc++ @gol | ||
| 68 | -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol | ||
| 69 | -static-libmpx -static-libmpxwrappers @gol | ||
| 70 | --shared -shared-libgcc -symbolic @gol | ||
| 71 | +-shared -shared-libgcc -symbolic -nostdlib++ @gol | ||
| 72 | -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol | ||
| 73 | -u @var{symbol} -z @var{keyword}} | ||
| 74 | |||
| 75 | @@ -11185,6 +11186,11 @@ These entries are usually resolved by entries in | ||
| 76 | libc. These entry points should be supplied through some other | ||
| 77 | mechanism when this option is specified. | ||
| 78 | |||
| 79 | +@item -nostdlib++ | ||
| 80 | +@opindex nostdlib++ | ||
| 81 | +Do not use the standard system C++ runtime libraries when linking. | ||
| 82 | +Only the libraries you specify will be passed to the linker. | ||
| 83 | + | ||
| 84 | @cindex @option{-lgcc}, use with @option{-nostdlib} | ||
| 85 | @cindex @option{-nostdlib} and unresolved references | ||
| 86 | @cindex unresolved references and @option{-nostdlib} | ||
| 87 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
| 88 | index 675bcc1..a37ec8b 100644 | ||
| 89 | --- a/gcc/gcc.c | ||
| 90 | +++ b/gcc/gcc.c | ||
| 91 | @@ -845,6 +845,7 @@ proper position among the other output files. */ | ||
| 92 | %(mflib) " STACK_SPLIT_SPEC "\ | ||
| 93 | %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ | ||
| 94 | %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ | ||
| 95 | + %{!nostdlib++:}\ | ||
| 96 | %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" | ||
| 97 | #endif | ||
| 98 | |||
| 99 | -- | ||
| 100 | 2.1.4 | ||
| 101 | |||
