Patchwork Add TF support for OpenBSD/i386 and OpenBSD/amd64

login
register
mail settings
Submitter Mark Kettenis
Date Oct. 7, 2012, 6:42 a.m.
Message ID <201210070642.q976gD9k004830@glazunov.sibelius.xs4all.nl>
Download mbox | patch
Permalink /patch/189791/
State New
Headers show

Comments

Mark Kettenis - Oct. 7, 2012, 6:42 a.m.
Adds the necessary support bits to libgcc.  All other mainstream
i386/amd64 targets already have this.

Tested on i386-unknown-openbsd5.2 and x86_64-unknown-openbsd5.2.
Fixes a couple of testcases.


libgcc/:

2012-10-06  Mark Kettenis  <kettenis@openbsd.org>

	    * config.host (i[34567]86-*-openbsd* and x86_64-*-openbsd*):
	    Add to list of i[34567]86-*-* and x86_64-*-* soft-fp targets.

gcc/:

2012-10-06  Mark Kettenis  <kettenis@openbsd.org>

	    * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT) 
	    (TF_SIZE): Define.
Gerald Pfeifer - Jan. 7, 2013, 10:49 p.m.
On Sun, 7 Oct 2012, Mark Kettenis wrote:
> Adds the necessary support bits to libgcc.  All other mainstream
> i386/amd64 targets already have this.
> 
> Tested on i386-unknown-openbsd5.2 and x86_64-unknown-openbsd5.2.
> Fixes a couple of testcases.
> 
> 
> libgcc/:
> 
> 2012-10-06  Mark Kettenis  <kettenis@openbsd.org>
> 
> 	    * config.host (i[34567]86-*-openbsd* and x86_64-*-openbsd*):
> 	    Add to list of i[34567]86-*-* and x86_64-*-* soft-fp targets.
> 
> gcc/:
> 
> 2012-10-06  Mark Kettenis  <kettenis@openbsd.org>
> 
> 	    * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT) 
> 	    (TF_SIZE): Define.

I realized this somehow got stalled and since it only affects
OpenBSD and you tested it there, I went ahead and did a build
on x86_64-suse-linux to make sure there is not negative effect
there and committed this.

Gerald
Mark Kettenis - Feb. 5, 2013, 8:25 p.m.
> Date: Mon, 7 Jan 2013 12:49:14 -1000 (TAHT)
> From: Gerald Pfeifer <gerald@pfeifer.com>
> 
> On Sun, 7 Oct 2012, Mark Kettenis wrote:
> > Adds the necessary support bits to libgcc.  All other mainstream
> > i386/amd64 targets already have this.
> > 
> > Tested on i386-unknown-openbsd5.2 and x86_64-unknown-openbsd5.2.
> > Fixes a couple of testcases.
> > 
> > 
> > libgcc/:
> > 
> > 2012-10-06  Mark Kettenis  <kettenis@openbsd.org>
> > 
> > 	    * config.host (i[34567]86-*-openbsd* and x86_64-*-openbsd*):
> > 	    Add to list of i[34567]86-*-* and x86_64-*-* soft-fp targets.
> > 
> > gcc/:
> > 
> > 2012-10-06  Mark Kettenis  <kettenis@openbsd.org>
> > 
> > 	    * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE, LIBGCC2_TF_CEXT) 
> > 	    (TF_SIZE): Define.
> 
> I realized this somehow got stalled and since it only affects
> OpenBSD and you tested it there, I went ahead and did a build
> on x86_64-suse-linux to make sure there is not negative effect
> there and committed this.

Thanks!

Patch

Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 192154)
+++ libgcc/config.host	(working copy)
@@ -1156,7 +1156,8 @@ 
   i[34567]86-*-gnu* | \
   i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
   i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
-  i[34567]86-*-freebsd* | x86_64-*-freebsd*)
+  i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
+  i[34567]86-*-openbsd* | x86_64-*-openbsd*)
   	tmake_file="${tmake_file} t-softfp-tf"
 	if test "${host_address}" = 32; then
 		tmake_file="${tmake_file} i386/${host_address}/t-softfp"
Index: gcc/config/i386/openbsdelf.h
===================================================================
--- gcc/config/i386/openbsdelf.h	(revision 192154)
+++ gcc/config/i386/openbsdelf.h	(working copy)
@@ -111,3 +111,9 @@ 
 #define OBSD_HAS_CORRECT_SPECS
 
 #define HAVE_ENABLE_EXECUTE_STACK
+
+/* Put all *tf routines in libgcc.  */
+#undef LIBGCC2_HAS_TF_MODE
+#define LIBGCC2_HAS_TF_MODE 1
+#define LIBGCC2_TF_CEXT q
+#define TF_SIZE 113