On 08.10.17 23:12, Andreas Tobler wrote:
Hi all,
and here is the patch for gcc-6/5 branch to add support for
armv7*-*-freebsd*
The difference towards trunk is the missing of target_cpu_cname which is
solved differently.
I'm aware of the gcc-5 branch status and I will not apply before gcc-5.5
is released. I'll also will not apply on the gcc-5 branch if the branch
gets closed.
If you have any objections, please speak up.
Committed _only_ on the gcc-6 branch: 253604
Andreas
2017-10-08 Andreas Tobler <andre...@gcc.gnu.org>
* config.gcc: (armv7*-*-freebsd*): New target.
Define TARGET_FREEBSD_ARMv7
* config/arm/freebsd.h: Use TARGET_FREEBSD_ARMv7 to define the
default cpu for armv7*-*-freebsd*.
Index: config/arm/freebsd.h
===================================================================
--- config/arm/freebsd.h (revision 253513)
+++ config/arm/freebsd.h (working copy)
@@ -112,6 +112,10 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
+#if defined (TARGET_FREEBSD_ARMv7)
+#undef SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_genericv7a
+#else
#if defined (TARGET_FREEBSD_ARMv6)
#undef SUBTARGET_CPU_DEFAULT
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs
@@ -119,6 +123,7 @@
#undef SUBTARGET_CPU_DEFAULT
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9
#endif
+#endif
/* FreeBSD 10 does not support unaligned access for armv6 and up.
Unaligned access support was added in FreeBSD 11. */
Index: config.gcc
===================================================================
--- config.gcc (revision 253513)
+++ config.gcc (working copy)
@@ -1072,6 +1072,10 @@
tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
fi
;;
+ armv7*-*-freebsd*)
+ tm_defines="${tm_defines} TARGET_FREEBSD_ARMv7=1"
+ tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
+ ;;
esac
with_tls=${with_tls:-gnu}
;;