[OpenWrt-Devel] [RFC] toolchain: gcc: drop 850-use_shared_libgcc.patch

Felix Fietkau nbd at nbd.name
Wed Jul 4 15:53:54 EDT 2018


On 2018-06-25 07:30, Yousong Zhou wrote:
> 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 be not needed now as the libgcc_spec logic of since
> at least gcc 5.5.0 already takes that into account
> 
>     %{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}}}}
Won't this link in libgcc by default unless -shared-libgcc is passed?
I think last time I looked into this, this caused some extra bloat to
creep into every single compiled binary.
Maybe you could compare binaries before and after this change to make
sure that is no longer the case.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list