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] |
Hi Richard, On 07.11.14 14:45, Richard Earnshaw wrote:
On 02/11/14 22:11, Andreas Tobler wrote:Hello all, this is a patch which brings support for arm*-*-freebsd* to trunk. The architectures supported are arm-*-*freebsd*, armv6-*-freebsd* and armv6hf-*-freebsd*. armv6 stands for ARM_ARCH == 6, arm stands for ARM_ARCH < 6. There is kernel development for armv8 aka. aarch64 ongoing but this is not covered here. This patch only covers 32-bit arm in a basic manner. The patch is built and tested against armv6, armv6hf and arm. The former two tests (lots of) were done on a WANDBOARD-QUAD, the latter on a MARVELL board with 256MB Ram and 200MHz cpu.... (around 72h+ for a build and test.....) Results for armv6hf are on the list. Only one entry but locally I ran several dozens runs... Once if this patch is accepted a few test suite additions will follow. (arm*-*-*eabi* -> arm_eabi) The patch itself is also prepared for arm*eb*-*-freebsd*, but I could not test since I lack the HW.
[snip]
This mostly looks OK, but a couple of nits.
Thank you for the review.
Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c (revision 217020) +++ gcc/config/arm/arm.c (working copy) @@ -2202,7 +2202,11 @@ { /* For Linux, we have access to kernel support for atomic operations. */ if (arm_abi == ARM_ABI_AAPCS_LINUX) +#ifndef __FreeBSD__ init_sync_libfuncs (2 * UNITS_PER_WORD); +#else + init_sync_libfuncs (UNITS_PER_WORD); +#endifThis would be better handled by some refactoring, so that we can eliminate the conditionalized code in the main function. Define something like MAX_SYNC_LIBFUNC_SIZE and then override it in the FreeBSD-specific header.
Done.
@@ -3036,6 +3040,9 @@ warning (0, "target CPU does not support unaligned accesses"); unaligned_access = 0; } +#ifdef __FreeBSD__ + unaligned_access = 0; +#endifThis really should be fixed in the OS; you're not really supporting the architecture properly if you don't allow this on v6 or later. In the mean time, the code should be moved to SUBTARGET_OVERRIDE_OPTIONS.
Agreed, for now as you suggested included it in the SUBTARGET_OVERRIDE_OPTIONS of config/arm/freebsd.h
Index: gcc/config/arm/freebsd.h =================================================================== --- gcc/config/arm/freebsd.h (revision 0) +++ gcc/config/arm/freebsd.h (working copy)+ +/* Use the AAPCS type for wchar_t, override the one from config/freebsd.h. */ +#undef WCHAR_TYPE +#define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long int")I don't think you should really be targeting anything that is not AAPCS based; so this should surely collapse to 'unsigned int'.
Done. Attached the revised version with adapted Changelog (thanks Gerald). Bootstraped and tested (results sent). Ok for trunk? Thanks again for your time. Andreas toplevel: 2014-11-08 Andreas Tobler <andreast@gcc.gnu.org> * configure.ac: Don't add ${libgcj} for arm*-*-freebsd*. * configure: Regenerate. gcc: 2014-11-08 Andreas Tobler <andreast@gcc.gnu.org> * config.gcc (arm*-*-freebsd*): New configuration. * config/arm/freebsd.h: New file. * config.host: Add extra components for arm*-*-freebsd*. * config/arm/arm.h: Introduce MAX_SYNC_LIBFUNC_SIZE. * config/arm/arm.c (arm_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE. libgcc: 2014-11-08 Andreas Tobler <andreast@gcc.gnu.org> * config.host (arm*-*-freebsd*): Add new configuration for arm*-*-freebsd*. * config/arm/freebsd-atomic.c: New file. * config/arm/t-freebsd: Likewise. * config/arm/unwind-arm.h: Add __FreeBSD__ to the list of 'PC-relative indirect' OS's. libstdc++-v3: 2014-11-08 Andreas Tobler <andreast@gcc.gnu.org> * configure.host: Add arm*-*-freebsd* port_specific_symbol_files.
Attachment:
gcc5_fbsd_arm_20141109-1.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |