On Fri, Apr 17, 2015 at 4:37 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Fri, Apr 17, 2015 at 01:04:20PM +0200, Uros Bizjak wrote: >> On Fri, Apr 17, 2015 at 12:36 PM, H.J. Lu <hjl.to...@gmail.com> wrote: >> >> >>>>> I can confirm that the most current patch bootstraps on >> >>>>> x86_64-apple-darwin14 and that all of the new tests show up as >> >>>>> unsupported in the test suite. >> >>>>> Jack >> >>>> >> >>>> I am re-posting this patch. OK for trunk? >> >>> >> >>> If Jack is happy, I’m happy. :-) That leaves the x86 people to comment >> >>> on it. >> >> >> >> What about Solaris? >> >> >> >> Uros. >> > >> > There are >> >> [...] >> >> Assuming Jakub is OK with the patch, let's go ahead with it. >> >> OK for mainline. > > I don't like it. Nonshared libgcc is libgcc.a, period. No sense in > creating yet another library for that. > So, IMHO beyond making the __cpu* entrypoints compat symbols only (@ instead > of @@ symbol versions) the right fix is simply tweak init_gcc_spec, so that > static_name is always linked in, in the switch combinations that it isn't > right now of course after shared_name rather than before that. > I thought we've fixed that years ago... >
We never pass -lgcc to linker when building C++ DSO: /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZC7iqy.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -shared /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbeginS.o -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. x.o -lstdc++ -lm -lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o [hjl@gnu-32 tmp]$ That is why libgcc_nonshared.a is needed. -- H.J.