This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Adding VxWorks PIC support to various backends
- From: Richard Henderson <rth at redhat dot com>
- To: gcc at gcc dot gnu dot org, richard at codesourcery dot com
- Date: Fri, 2 Mar 2007 10:13:04 -0800
- Subject: Re: RFC: Adding VxWorks PIC support to various backends
- References: <874pp3looh.fsf@firetop.home>
On Fri, Mar 02, 2007 at 02:12:30PM +0000, Richard Sandiford wrote:
> CodeSourcery is gearing up to submit support for the VxWorks RTP PIC
> model. Six targets are affected: arm, i386, mips, rs6000, sh and sparc.
> All this code is conditional on TARGET_VXWORKS_RTP being true and refers
> to two other macros: VXWORKS_GOTT_BASE and VXWORKS_GOTT_INDEX.
>
> Before submitting patches, I just wanted to ask how this code should
> be integrated into the surrounding non-VxWorks code. Some obvious
> alternatives are:
>
> 1) Wrap it in #ifdef TARGET_VXWORKS_RTP.
>
> 2) Provide an always-false definition of TARGET_VXWORKS_RTP in
> arm.h, i386.h, etc. Also provide dummy definitions of the
> VXWORKS_GOTT_* macros.
>
> 3) Provide an always-false definition of TARGET_VXWORKS_RTP in
> defaults.h. Also provide dummy definitions of the VXWORKS_GOTT_*
> macros.
>
> 4) Like (3), but provide the real VxWorks default values of the
> VXWORKS_GOTT_* macros (rather than dummy ones).
How about (3), but instead of putting them in defaults.h, put them in
config/vxworks-dummy.h, and include that in the relevant cpu.c files?
I am fond of dummy versions like
#define VXWORKS_GOTT_BASE (gcc_unreachable(), "")
r~