This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Fix use of TARGET_VTABLE_USES_DESCRIPTORS in libgcov.c
- From: Richard Henderson <rth at redhat dot com>
- To: sje at cup dot hp dot com
- Cc: gcc-patches at gcc dot gnu dot org, joseph at codesourcery dot com
- Date: Sun, 31 Oct 2010 16:45:17 -0700
- Subject: Re: [Patch] Fix use of TARGET_VTABLE_USES_DESCRIPTORS in libgcov.c
- References: <201010121745.o9CHjCg27298@lucas.cup.hp.com>
On 10/12/2010 10:45 AM, Steve Ellcey wrote:
> + VTABLE_USES_DESCRIPTORS is set to 0 if TARGET_VTABLE_USES_DESCRIPTORS
> + is not set by the target or 1 if it is. This is needed because
> + TARGET_VTABLE_USES_DESCRIPTORS could depend on compiler flags and
> + cannot be used in libgcov.c. */
> +
> +#ifdef TARGET_VTABLE_USES_DESCRIPTORS
> +#define VTABLE_USES_DESCRIPTORS 1
> +#else
> #define TARGET_VTABLE_USES_DESCRIPTORS 0
> +#define VTABLE_USES_DESCRIPTORS 0
> #endif
Not ok for defaults.h.
It does seem like the smallest change would be an ifdef test in
libgconv.c, e.g. moving the above sequence into libgconv.c.
A Proper Fix would seem to be providing a cpp-builtin define,
but without adding some sort of -fbuilding-libgcc flag, I don't
know if we want to export such a define to the users.
r~