public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gas: add support for FreeBSD ARM
@ 2014-08-15 21:22 Andreas Tobler
  2014-08-19 15:16 ` Nicholas Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2014-08-15 21:22 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

Hello,

the attached patch adds support for FreeBSD ARM in gas.

A few words, until FreeBSD-9.x we have only the OABI for arm.

Before FreeBSD-8 there was/is no arm support from the OS side.

 From FreeBSD-10 upwards we have EABI support.

Regarding vfp, only the armv6 are supported from the OS side. This is 
why I split off the vfp part from the eabi part.

The test results are around 505 Passes vs. 8 unsupported, on armv6 
(WANDBOARD). Similar for an arm (marvell).

Is this patch ok for trunk?

Thanks in advance,
Andreas

2014-08-15  Andreas Tobler  <andreast@fgznet.ch>

	* Makefile.am: Add FreeBSD ARM support.
	* Mafefile.in: Regenerate.
	* configure.tgt: Add FreeBSD ARM support.
	* config/te-armfbsdeabi.h: New file.
	* config/te-armfbsdvfp.h: Likewise.

[-- Attachment #2: gas_arm_fbsd_20140815.diff --]
[-- Type: text/plain, Size: 3470 bytes --]

diff --git a/gas/Makefile.am b/gas/Makefile.am
index 5727c75..972d379 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -296,6 +296,8 @@ TARG_ENV_HFILES = \
 	config/te-386bsd.h \
 	config/te-aix5.h \
 	config/te-armeabi.h \
+	config/te-armfbsddeabi.h \
+	config/te-armfbsdvfp.h \
 	config/te-armlinuxeabi.h \
 	config/te-dynix.h \
 	config/te-epoc-pe.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index be2711b..f42df83 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -565,6 +565,8 @@ TARG_ENV_HFILES = \
 	config/te-386bsd.h \
 	config/te-aix5.h \
 	config/te-armeabi.h \
+	config/te-armfbsddeabi.h \
+	config/te-armfbsdvfp.h \
 	config/te-armlinuxeabi.h \
 	config/te-dynix.h \
 	config/te-epoc-pe.h \
diff --git a/gas/config/te-armfbsdeabi.h b/gas/config/te-armfbsdeabi.h
new file mode 100644
index 0000000..8a72e21
--- /dev/null
+++ b/gas/config/te-armfbsdeabi.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2004-2014 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 3,
+   or (at your option) any later version.
+
+   GAS is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+   the GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#include "te-freebsd.h"
+
+#define EABI_DEFAULT EF_ARM_EABI_VER5
diff --git a/gas/config/te-armfbsdvfp.h b/gas/config/te-armfbsdvfp.h
new file mode 100644
index 0000000..945ac7c
--- /dev/null
+++ b/gas/config/te-armfbsdvfp.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2004-2014 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 3,
+   or (at your option) any later version.
+
+   GAS is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+   the GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#include "te-armfbsdeabi.h"
+
+#define FPU_DEFAULT FPU_ARCH_VFP
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 9319d33..4b78908 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -138,6 +138,10 @@ case ${generic_target} in
   arm-*-symbianelf*)			fmt=elf em=symbian ;;
   arm-*-kaos*)				fmt=elf ;;
   arm-*-conix*)				fmt=elf ;;
+  arm-*-freebsd[89].* | armeb-*-freebsd[89].*)
+					fmt=elf  em=freebsd ;;
+  arm-*-freebsd* | armeb-*-freebsd*)	fmt=elf  em=armfbsdeabi ;;
+  arm*-*-freebsd*)			fmt=elf  em=armfbsdvfp ;;
   arm-*-linux*aout*)			fmt=aout em=linux ;;
   arm-*-linux-*eabi*)			fmt=elf  em=armlinuxeabi ;;
   arm-*-linux-*)			fmt=elf  em=linux ;;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gas: add support for FreeBSD ARM
  2014-08-15 21:22 [PATCH] gas: add support for FreeBSD ARM Andreas Tobler
@ 2014-08-19 15:16 ` Nicholas Clifton
  2014-08-19 17:06   ` Andreas Tobler
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Clifton @ 2014-08-19 15:16 UTC (permalink / raw)
  To: Andreas Tobler, binutils

Hi Andreas,

> 2014-08-15  Andreas Tobler  <andreast@fgznet.ch>
>
>      * Makefile.am: Add FreeBSD ARM support.
>      * Mafefile.in: Regenerate.
>      * configure.tgt: Add FreeBSD ARM support.
>      * config/te-armfbsdeabi.h: New file.
>      * config/te-armfbsdvfp.h: Likewise.

Approved and applied.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gas: add support for FreeBSD ARM
  2014-08-19 15:16 ` Nicholas Clifton
@ 2014-08-19 17:06   ` Andreas Tobler
  2014-08-20  0:43     ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2014-08-19 17:06 UTC (permalink / raw)
  To: Nicholas Clifton, binutils

Hi Nick,

On 19.08.14 17:15, Nicholas Clifton wrote:

>> 2014-08-15  Andreas Tobler  <andreast@fgznet.ch>
>>
>>       * Makefile.am: Add FreeBSD ARM support.
>>       * Mafefile.in: Regenerate.
>>       * configure.tgt: Add FreeBSD ARM support.
>>       * config/te-armfbsdeabi.h: New file.
>>       * config/te-armfbsdvfp.h: Likewise.
>
> Approved and applied.

Thanks a lot! I got overrun by your fast response.

Unfortunately I discovered a minor glitch in the Makefile.am/in, see below.

As far as I could test, it has no functional change on gas.

Is this ok?

2014-08-19  Andreas Tobler  <andreast@fgznet.ch>

	* Makefile.am: Fix typo: s/armfbsddeabi/armfbsdeabi.
	* Makefile.in: Regenerate.


diff --git a/gas/Makefile.am b/gas/Makefile.am
index 972d379..55c86b2 100644
+++ b/gas/Makefile.am
@@ -296,7 +296,7 @@ TARG_ENV_HFILES = \
         config/te-386bsd.h \
         config/te-aix5.h \
         config/te-armeabi.h \
-       config/te-armfbsddeabi.h \
+       config/te-armfbsdeabi.h \
         config/te-armfbsdvfp.h \
         config/te-armlinuxeabi.h \
         config/te-dynix.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index f42df83..5dc250f 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -565,7 +565,7 @@ TARG_ENV_HFILES = \
         config/te-386bsd.h \
         config/te-aix5.h \
         config/te-armeabi.h \
-       config/te-armfbsddeabi.h \
+       config/te-armfbsdeabi.h \
         config/te-armfbsdvfp.h \
         config/te-armlinuxeabi.h \
         config/te-dynix.h \

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gas: add support for FreeBSD ARM
  2014-08-19 17:06   ` Andreas Tobler
@ 2014-08-20  0:43     ` Alan Modra
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2014-08-20  0:43 UTC (permalink / raw)
  To: Andreas Tobler; +Cc: Nicholas Clifton, binutils

On Tue, Aug 19, 2014 at 07:06:13PM +0200, Andreas Tobler wrote:
> Unfortunately I discovered a minor glitch in the Makefile.am/in, see below.
> 
> As far as I could test, it has no functional change on gas.
> 
> Is this ok?
> 
> 2014-08-19  Andreas Tobler  <andreast@fgznet.ch>
> 
> 	* Makefile.am: Fix typo: s/armfbsddeabi/armfbsdeabi.
> 	* Makefile.in: Regenerate.

Yes, you could have committed this patch as obvious.  I discovered the
typo this morning and pushed the same fix plus a regen of
gas/po/POTFILES.in, before reading your email..

> 
> 
> diff --git a/gas/Makefile.am b/gas/Makefile.am
> index 972d379..55c86b2 100644
> +++ b/gas/Makefile.am
> @@ -296,7 +296,7 @@ TARG_ENV_HFILES = \
>         config/te-386bsd.h \
>         config/te-aix5.h \
>         config/te-armeabi.h \
> -       config/te-armfbsddeabi.h \
> +       config/te-armfbsdeabi.h \
>         config/te-armfbsdvfp.h \
>         config/te-armlinuxeabi.h \
>         config/te-dynix.h \

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-20  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15 21:22 [PATCH] gas: add support for FreeBSD ARM Andreas Tobler
2014-08-19 15:16 ` Nicholas Clifton
2014-08-19 17:06   ` Andreas Tobler
2014-08-20  0:43     ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).