This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] add FreeBSD/StrongARM target
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: obrien at FreeBSD dot org
- Cc: gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Tue, 11 Dec 2001 10:53:28 +0000
- Subject: Re: [PATCH] add FreeBSD/StrongARM target
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> This patch adds support for FreeBSD/StrongARM. I had to move the
> placement of "-Acpu=arm -Amachine=arm" from CPP_PREDEFINES so that those
> could be used by the OS. I feel they fit nicely in CPP_CPU_ARCH_SPEC so
> I hope this will be acceptable.
I'd really like to see a patch that split CPP_PREDEFINES into
CPP_CPU_PREDEFINES and CPP_OS_PREDEFINES. But I'm not going to make an
issue of this at this point.
> 2001-12-10 David O'Brien <obrien@FreeBSD.org>
> * config.gcc (arm-*-freebsd*): Add target.
This bit is Ok.
> * config/arm/freebsd.h: New file.
See comments later in this message.
> * config/arm/arm.h (CPP_PREDEFINES): Use null definition.
This is unnecessary. Just remove the definition here entirely.
> (CPP_SPEC): #undef before defining.
This *should* also be unnecessary. No other part of the ARM description
should ever try to override this.
> (CPP_CPU_ARCH_SPEC): Add -Acpu=arm -Amachine=arm.
> * arm/conix-elf.h (CPP_PREDEFINES): Remove -Acpu=arm -Amachine=arm.
> * config/arm/linux-elf.h: Likewise.
> * config/arm/netbsd.h: Likewise.
> * config/arm/riscix.h: Likewise.
> * config/arm/riscix1-1.h: Likewise.
> * config/arm/semiaof.h: Likewise.
This bit is OK.
> --- /dev/null Sun Dec 9 20:08:16 2001
> +++ config/arm/freebsd.h Thu Dec 6 13:11:03 2001
> +You should have received a copy of the GNU General Public License
> +along with GNU CC; see the file COPYING. If not, write to
> +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
This address out of date. Please use the latest one (it's in all the
other copyright messages)
> +/* 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.
> +#undef SUBTARGET_CPU_DEFAULT
> +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm /*TARGET_CPU_arm710*/
Remove dead comment.
> +#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
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?