fix xserver build with clang on armv7

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fix xserver build with clang on armv7

Matthieu Herrb-7
Hi,

I'm not sure if the __VFP_FP__ section below was still useful for gcc
builds, at lead it doesn't build and doesn't look needed with clang
(the functions are all provied by libcompiler_rt, which is included).

ok ?

Index: hw/xfree86/os-support/bsd/arm_video.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/bsd/arm_video.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 arm_video.c
--- hw/xfree86/os-support/bsd/arm_video.c 28 Sep 2015 07:14:00 -0000 1.14
+++ hw/xfree86/os-support/bsd/arm_video.c 20 Jan 2018 10:17:09 -0000
@@ -88,7 +88,8 @@ xf86PrivilegedInit(void)
     xf86OpenConsole();
 }
 
-#ifdef __VFP_FP__
+
+#if defined(__VFP_FP__) && !defined(__clang__)
 /*
  * force softfloat functions into binary,
  * yes the protos/ret are all bogus.
@@ -149,4 +150,5 @@ __subdf3();
 __subsf3();
 __truncdfsf2();
 }
-#endif /* __VFP_FP__ */
+#endif /* __VFP_FP__ && !__clang__ */
+

--
Matthieu Herrb

Reply | Threaded
Open this post in threaded view
|

Re: fix xserver build with clang on armv7

Jonathan Gray-11
On Sat, Jan 20, 2018 at 11:19:22AM +0100, Matthieu Herrb wrote:
> Hi,
>
> I'm not sure if the __VFP_FP__ section below was still useful for gcc
> builds, at lead it doesn't build and doesn't look needed with clang
> (the functions are all provied by libcompiler_rt, which is included).
>
> ok ?

The __VFP_FP__ block seems to be a local change that predates
xenocara 1.1 can we just remove it?

Added in XF4 1.4

----------------------------
revision 1.4
date: 2004/06/16 16:04:12;  author: todd;  state: Exp;  lines: +113 -574;
add cats support from drahn@ (thanks!)
----------------------------

>
> Index: hw/xfree86/os-support/bsd/arm_video.c
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/bsd/arm_video.c,v
> retrieving revision 1.14
> diff -u -p -u -r1.14 arm_video.c
> --- hw/xfree86/os-support/bsd/arm_video.c 28 Sep 2015 07:14:00 -0000 1.14
> +++ hw/xfree86/os-support/bsd/arm_video.c 20 Jan 2018 10:17:09 -0000
> @@ -88,7 +88,8 @@ xf86PrivilegedInit(void)
>      xf86OpenConsole();
>  }
>  
> -#ifdef __VFP_FP__
> +
> +#if defined(__VFP_FP__) && !defined(__clang__)
>  /*
>   * force softfloat functions into binary,
>   * yes the protos/ret are all bogus.
> @@ -149,4 +150,5 @@ __subdf3();
>  __subsf3();
>  __truncdfsf2();
>  }
> -#endif /* __VFP_FP__ */
> +#endif /* __VFP_FP__ && !__clang__ */
> +
>
> --
> Matthieu Herrb
>

Reply | Threaded
Open this post in threaded view
|

Re: fix xserver build with clang on armv7

Jeremie Courreges-Anglas-2
On Sat, Jan 20 2018, Jonathan Gray <[hidden email]> wrote:

> On Sat, Jan 20, 2018 at 11:19:22AM +0100, Matthieu Herrb wrote:
>> Hi,
>>
>> I'm not sure if the __VFP_FP__ section below was still useful for gcc
>> builds, at lead it doesn't build and doesn't look needed with clang
>> (the functions are all provied by libcompiler_rt, which is included).
>>
>> ok ?
>
> The __VFP_FP__ block seems to be a local change that predates
> xenocara 1.1 can we just remove it?
>
> Added in XF4 1.4
>
> ----------------------------
> revision 1.4
> date: 2004/06/16 16:04:12;  author: todd;  state: Exp;  lines: +113 -574;
> add cats support from drahn@ (thanks!)
> ----------------------------

fwiw, I just "fixed" the existing code in my local copy, keeping in mind
that softfloat on arm should get away soon...

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: fix xserver build with clang on armv7

Matthieu Herrb-7
In reply to this post by Jonathan Gray-11
On Sat, Jan 20, 2018 at 10:50:58PM +1100, Jonathan Gray wrote:

> On Sat, Jan 20, 2018 at 11:19:22AM +0100, Matthieu Herrb wrote:
> > Hi,
> >
> > I'm not sure if the __VFP_FP__ section below was still useful for gcc
> > builds, at lead it doesn't build and doesn't look needed with clang
> > (the functions are all provied by libcompiler_rt, which is included).
> >
> > ok ?
>
> The __VFP_FP__ block seems to be a local change that predates
> xenocara 1.1 can we just remove it?
>
> Added in XF4 1.4
>
> ----------------------------
> revision 1.4
> date: 2004/06/16 16:04:12;  author: todd;  state: Exp;  lines: +113 -574;
> add cats support from drahn@ (thanks!)
> ----------------------------

Yes I think it wasn't needed with recent gcc on armv7. Just never took
the time to verify whether it could be removed or not.
I'll remove it since we don't care about building /usr/xenocara wrt
older /usr/src.

>
> >
> > Index: hw/xfree86/os-support/bsd/arm_video.c
> > ===================================================================
> > RCS file: /cvs/OpenBSD/xenocara/xserver/hw/xfree86/os-support/bsd/arm_video.c,v
> > retrieving revision 1.14
> > diff -u -p -u -r1.14 arm_video.c
> > --- hw/xfree86/os-support/bsd/arm_video.c 28 Sep 2015 07:14:00 -0000 1.14
> > +++ hw/xfree86/os-support/bsd/arm_video.c 20 Jan 2018 10:17:09 -0000
> > @@ -88,7 +88,8 @@ xf86PrivilegedInit(void)
> >      xf86OpenConsole();
> >  }
> >  
> > -#ifdef __VFP_FP__
> > +
> > +#if defined(__VFP_FP__) && !defined(__clang__)
> >  /*
> >   * force softfloat functions into binary,
> >   * yes the protos/ret are all bogus.
> > @@ -149,4 +150,5 @@ __subdf3();
> >  __subsf3();
> >  __truncdfsf2();
> >  }
> > -#endif /* __VFP_FP__ */
> > +#endif /* __VFP_FP__ && !__clang__ */
> > +
> >
> > --
> > Matthieu Herrb
> >

--
Matthieu Herrb