This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Define __GXX_WEAK__ to 0 when using -fno-weak
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 1 May 2005 16:36:58 -0400
- Subject: Re: PATCH: Define __GXX_WEAK__ to 0 when using -fno-weak
- References: <200505012035.j41KZ6Ro007062@sirius.codesourcery.com>
On May 1, 2005, at 4:35 PM, Mark Mitchell wrote:
On a system in which weak symbols are supported (and, hence,
SUPPORTS_WEAK is defined), but when -fno-weak is being used, we still
define __GXX_WEAK__ to 1, which results in libsupc++ using
pointer-comparison to determine typeinfo identity, rather than
string-comparison. Fixed with the attached patch. I also added
documentation for a few predefined preprocessor symbols which were not
Tested on x86_64-unknown-linux-gnu, applied on the mainline.
(Personally, I'd be happy to remove -fno-weak entirely, and just say
that wehther or not you get weak/COMDAT symbols depends purely on
whether or not your system supports that. But, that's another
This was PR 14391.
I had messed up the logic when I write a patch for this, oh well.