diff mbox series

[arm,FreeBSD] gcc-6/5: add support for armv7*-*-freebsd*

Message ID ea94bce6-286d-7403-77a5-5085c3010a8b@fgznet.ch
State New
Headers show
Series [arm,FreeBSD] gcc-6/5: add support for armv7*-*-freebsd* | expand

Commit Message

Andreas Tobler Oct. 8, 2017, 9:12 p.m. UTC
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.

TIA,
Andreas

2017-10-08  Andreas Tobler  <andreast@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*.

Comments

Andreas Tobler Oct. 10, 2017, 6:52 p.m. UTC | #1
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  <andreast@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}
>    	;;
>
diff mbox series

Patch

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}
  	;;