toolchain: gcc: drop 850-use_shared_libgcc.patch
A link error was encountered when invoking "gccgo -static hello.go" to
test a fix for gccgo [1]. The linker cannot find reference to
_Unwind_Resume which is defined in libgcc_eh.a and from the "gccgo -v"
and "gccgo -dumpspecs" output, I found the issue was caused by
libgcc_spec being patched by the said patch
The patch was originally introduced for linaro-gcc 4.5 in 2011 commit
23e18c9 ("gcc-linaro: fix the libgcc spec to default to using the shared
libgcc").
It should also be noted that -lgcc_eh was removed in a followed up
commit
c2e2651 ("toolchain: remove -lgcc_eh from the default libgcc
spec, it breaks packages"), though the actual symptom was not recorded
then
Current libgcc_spec has the following value after expanded from -lgcc by
init_gcc_specs(). Maybe modify it to only include -lgcc when static or
static-libgcc is on
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
[1] https://bugs.openwrt.org/index.php?do=details&task_id=1498
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>