This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Dealing with TARGET_CPU_CPP_BUILTINS
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 4 Oct 2010 12:01:18 +0000 (UTC)
- Subject: Re: [RFC] Dealing with TARGET_CPU_CPP_BUILTINS
- References: <32F2B9F1-E86E-4DF2-8758-4FC95BD1DE41@gmail.com>
On Mon, 4 Oct 2010, FX wrote:
> The attached patch is my first attempt to deal with
> TARGET_CPU_CPP_BUILTINS macros by splitting them into
> language-independent and C-family parts. This is now more like a
> demonstration of how I intend to proceed, by creating a new macro
> TARGET_CPU_CPP_BUILTINS_CFAMILY. Also, it shows how I proceed for the
> case of targets that employ a worker function (which thus does fully
> belong to, e.g., i386-c.c anymore).
I don't think you need define_target_specific_builtins as part of the
public interface to cppbuiltin.c; it will always be called along with
define_language_independent_builtin_macros so may as well be called
internally by that function (which could gain an iso_c parameter for that
purpose).
I suppose calling cpp_define directly in target .c files (and generally
not having a separate set of preprocessor-using-front-end-hooks) is safe
in that all front ends are linked with cpplib, though I think the reason
they are so linked at present is just for the line-map code.
--
Joseph S. Myers
joseph@codesourcery.com