toolchain: gcc: drop 850-use_shared_libgcc.patch shared-libgcc
authorYousong Zhou <yszhou4tech@gmail.com>
Fri, 22 Jun 2018 09:02:58 +0000 (17:02 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 6 Jul 2018 06:33:51 +0000 (14:33 +0800)
commit26172f4878e9ff0eea0760b5a2085e2962aab276
treee7be1ced1653d7a5e4ba91dbe9ff22c305558d52
parent9009efa18b45b4b573111fafa777f7b642486e3e
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>
toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch [deleted file]
toolchain/gcc/patches/7.3.0/850-use_shared_libgcc.patch [deleted file]
toolchain/gcc/patches/arc-2017.09-release/850-use_shared_libgcc.patch [deleted file]