diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-07-24 13:11:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-27 10:36:28 +0100 |
commit | 2a212e56a814e5dc8a8bae4974b91109ed0486ef (patch) | |
tree | 474fadc9377c83df36013d68050c58816cd3b4b7 /meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch | |
parent | ef2a842d06b3a9ee6036af06247c7c022f8c720d (diff) | |
download | openembedded-core-2a212e56a814e5dc8a8bae4974b91109ed0486ef.tar.gz openembedded-core-2a212e56a814e5dc8a8bae4974b91109ed0486ef.tar.bz2 openembedded-core-2a212e56a814e5dc8a8bae4974b91109ed0486ef.zip |
gcc5: Upgrade from 5.1 to 5.2
This is second bugfix release in gcc5 series
All backported patches are dropped
no other patches needed any rework
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.2/0014-optional-libstdc.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch new file mode 100644 index 0000000000..374fe43881 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch @@ -0,0 +1,101 @@ +From d7b42d93d077b2523c26f0dff0b6c44fdfff9d3c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Mar 2013 09:12:56 +0400 +Subject: [PATCH 14/35] optional libstdc + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Inappropriate [embedded specific] +--- + gcc/c-family/c.opt | 4 ++++ + gcc/cp/g++spec.c | 1 + + gcc/doc/invoke.texi | 8 +++++++- + gcc/gcc.c | 1 + + 4 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 983f4a8..96924f6 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1543,6 +1543,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++ + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c +index 6536d7e..f57a5d4 100644 +--- a/gcc/cp/g++spec.c ++++ b/gcc/cp/g++spec.c +@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 0df8a47..73856d0 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -195,6 +195,7 @@ in the following sections. + -fvisibility-inlines-hidden @gol + -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol + -fvtv-counts -fvtv-debug @gol ++-nostdlib++ @gol + -fvisibility-ms-compat @gol + -fext-numeric-literals @gol + -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol +@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}. + -s -static -static-libgcc -static-libstdc++ @gol + -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol + -static-libmpx -static-libmpxwrappers @gol +--shared -shared-libgcc -symbolic @gol ++-shared -shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol} -z @var{keyword}} + +@@ -11185,6 +11186,11 @@ These entries are usually resolved by entries in + libc. These entry points should be supplied through some other + mechanism when this option is specified. + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ + @cindex @option{-lgcc}, use with @option{-nostdlib} + @cindex @option{-nostdlib} and unresolved references + @cindex unresolved references and @option{-nostdlib} +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 675bcc1..a37ec8b 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -845,6 +845,7 @@ proper position among the other output files. */ + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" + #endif + +-- +2.1.4 + |