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]

[PATCH][ARM] FreeBSD ARM support, EABI, v3


All,

here is the third attempt to support ARM with FreeBSD.

In the meantime we found another issue in the unwinder where I had to adapt some stuff.

The unwind_phase2_forced function in libgcc calls a stop_fn function. This stop_fn is in FreeBSD's libthr implementation and is called thread_unwind_stop. This thread_unwind_stop is a generic function used on all FreeBSD archs.

The issue is now that this thread_unwind_stop expects a double int for the exception_class, like on every other arch. For ARM EABI this exception_class is an array of char which is passed in one register as pointer vs. two registers for a double int.

To solve this issue we defined the exception_class as double integer for FreeBSD.

This adaptation reduced the failure count in libstdc++ by about 40 fails.

I build and test this port on a regular basis and I post the results to the usual place.

I'd appreciate some feedback and if possible an ACK if ok for trunk.

Thank you,
Andreas

Here the previous posts to this subject:

First version:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00029.html

Second version:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03427.html


toplevel:

	* configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
	* configure: Regenerate.
gcc:
	* 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.
	* ginclude/unwind-arm-common.h (_Uwind_Control_Block): Define
	exception_class as double integer for FreeBSD ARM.
	(_Unwind_Exception): Define _Unwind_Exception_Class as double integer
	for FreeBSD ARM.

libgcc:

	* 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.

libatomic:

	* configure.tgt: Exclude arm*-*-freebsd* from try_ifunc.

libstdc++-v3:

	* configure.host: Add arm*-*-freebsd* port_specific_symbol_files.
	* libsupc++/unwind-cxx.h (__is_gxx_exception_class,
	__is_dependent_exception): Exclude FreeBSD ARM from the
	__ARM_EABI_UNWINDER__ ifdef.

Attachment: gcc5_fbsd_arm_20141230-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]