This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cmath call builtin sqrtf but many platforms seem miss that(was Re: lrint lrintf problems )
- From: Gabriel Dos Reis <dosreis at gmail dot com>
- To: Bernd Roesch <nospamname at web dot de>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 9 Mar 2009 04:53:39 -0600
- Subject: Re: cmath call builtin sqrtf but many platforms seem miss that(was Re: lrint lrintf problems )
- References: <84fc9c000903060433s70803feawa9d3b6cb51e96d43@mail.gmail.com> <yam11390.610.281567712@mail.gmx.net>
- Reply-to: gdr at integrable-solutions dot net
On Mon, Mar 9, 2009 at 2:42 AM, Bernd Roesch <nospamname@web.de> wrote:
> Hello Richard
>
> On 06.03.09, you wrote:
>
> ah thanks for info, i understand now too wy sqrtf, fmod (work in C programs)
> get linker error on C++ programs but sqrt and some other work on platform
> 68k.
> in c++/4.3.2/cmath include
>
> is this code.
>
> using ::sqrt;
>
> ?inline float
> ?sqrt(float __x)
> ?{ return __builtin_sqrtf(__x); }
>
> But .md file of many architetures contain no entry for this.I see only i386,
> rs6000, ia64, sh contain code for this.(I search for sqrtf and list files
> that contain this)
> the header files are build during GCC build, i change nothing.
>
> Is there something wrong during compiler Build process ?
The above sqrt() function is distinct from the C version, because
it has a C++ linkage. Consequently, I would expect that if
__builtin_sqrtf() is not available, the compiler would emit a
library call to the out-of-line C version.
-- Gaby