This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proper way to include gcc/config/<arch>/<arch>.h ?
- To: obrien at freebsd dot org
- Subject: Re: proper way to include gcc/config/<arch>/<arch>.h ?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Mon, 14 May 01 18:34:15 EDT
- Cc: gcc at gcc dot gnu dot org
What is the proper way to include gcc/config/<arch>/<arch>.h?
`tm_file' is set early in `config.gcc' as
"tm_file=${cpu_type}/${cpu_type}.h", however some config triplets add to
`tm_file' by "tm_file="${tm_file} foo.h", while others totally
overwrite it with tm_file="foo.h <arch>/<arch>.h bar.h". Others do all
kinds of things -- "*-*-gnu*" is a good example of this.
I am finding it impossible to find a clean multi-platform example to
follow.
It depends on the structure of the port's files. Some <arch>.h files expect
things to be defined before they are included and use those to select various
options. Those ports will use the second method.
Others will define default definitions for macros and expect other files to
override them. Those use the first method. This is what I think is the
cleanest.
And some have some files that work both ways, though that's a real mess.