This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix use of TARGET_VTABLE_USES_DESCRIPTORS in libgcov.c


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]