This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] Don't use ELF weak for entities with vague linkagewhen COMDAT groups are available
Julian Brown wrote:
I have tried the building a gcc on x86-64 with the vanilla binutils from
SuSE 9.2 built from source, and it doesn't exhibit this problem. With
SuSE patches applied, the build fails for for me (on a non-SuSE system).
So in this case, the problem would appear to be one of the SuSE patches.
It sounds like we need an autoconf test. That's going to be a bit of a
pain, in that I guess we need to both assemble and link something.
We could do:
as -o conftest.o conftest.s
ld -r -o /dev/null conftest.o conftest.o
to make sure that COMDAT works. But, the linker warnings Diego is
seeing probably wouldn't show up, as that only happens when symbols have
different sizes in the two object files.
So, should we just fall back to have an --enable-comdat switch? On by
default if the current HAVE_GAS_COMDAT says that the assembler has
COMDAT; off by default otherwise? That way people could configure with
--disable-comdat if they have assemblers/linkers that only partially
support COMDAT. Thoughts?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304