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] add FreeBSD/StrongARM target


On Tue, Dec 11, 2001 at 10:53:28AM +0000, Richard Earnshaw wrote:
> > 	(CPP_SPEC): #undef before defining.
> This *should* also be unnecessary.  No other part of the ARM description 
> should ever try to override this.

gcc/config/freebsd.h has already defined it by the time arm/arm.h is
included.  This may be a mistake on the part of gcc/config/freebsd.h that
is coming to light with the addition of more cpu support.

    #define FBSD_CPP_SPEC " \
      %(cpp_cpu) \
      %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
      %{posix:-D_POSIX_SOURCE}"

I thought that everything <cpu>/<cpu.h> would want would be in the
``cpp_cpu''.

Anyway, that is why the #undef is needed.


 
> > +/* arm.h gets this wrong for FreeBSD.  We use the GCC defaults instead.  */
> > +
> > +#undef  DEFAULT_SIGNED_CHAR
> > +#define DEFAULT_SIGNED_CHAR	1
> 
> Err, I really don't think this should be part of the FreeBSD API.  
> Signedness of chars should be a machine-dependent issue; the reason for 
> leaving it open is that it can make a huge difference to the performance 
> of code, and the ARM is much better at handling unsigned char than it is 
> at signed char.

My goal is to make FreeBSD on ARM look like FreeBSD on sparc64 as on i386
(as much as is possible).  I am willing to comment it out now, but do
wish you would be willing to allow it back in if the FreeBSD development
community felt signed chars was preferable.

 
> > +#undef  SUBTARGET_CPU_DEFAULT
> > +#define SUBTARGET_CPU_DEFAULT	TARGET_CPU_strongarm /*TARGET_CPU_arm710*/
...
> > +#undef  TARGET_VERSION
> > +#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)");
> 
> Err, why StrongARM.  There's nothing particular here that restricts your 
> code to that CPU... ARM(v4) would be better (v4== architecture of 
> StrongARM).
>
> I'd be interested in knowing your reasoning for selecting v4 as the base 
> architecture (not that it is necessarily wrong).  What machines do you 
> plan to target?

That's a good question.  We've had demand from the embedded arena for
FreeBSD StrongARM support.  But we know we cannot target every board in
existence like Wind River does.  For now we are targeting a reference
platform (two actually -- Compaq iPaq and DNARD) and see where things
take us.  There is no interest in supporting the 26-bit processors.  Only
the SA110 and later (ie, things still be designed with today).

Any advice would be helpful.


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