This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cmath call builtin sqrtf but many platforms seem miss that(was Re: lrint lrintf problems )


Hello Richard

On 09.03.09, you wrote:

>> I believe one should convince the middle end to emit libcall
>> for __builtin_xxx when the target has no builtint support.
> 
> It of course does.

On what codeplace is the redefine do in GCC source ?

I see in my c++config.h file

this stand here

/* Define if the compiler/host combination has __builtin_sqrtf. */
/* #undef _GLIBCXX_HAVE___BUILTIN_SQRTF */ 

I find now a solution that work without change of cmath

when i add in math.h this line then it work.the function can too stand as
static inline in the math.h file.

#define __builtin_sqrtf sqrtf

> On Mon, Mar 9, 2009 at 3:59 PM, Gabriel Dos Reis <dosreis@gmail.com>
> wrote:
>> On Mon, Mar 9, 2009 at 7:11 AM, Bernd Roesch <nospamname@web.de> wrote:
>>> Hello Gabriel
>> [...]
>>> 
>>> You see there is the _ not in.normaly funcs that not find have a _
>>> before
>>> 
>>> To get all work, it seem i need add the same function add in math.h and
>>> in
>>> the linker
>>> lib or change cmath file and remove all __builtin_ commands the
>>> architecture
>>> not have.
>> 
>> I believe one should convince the middle end to emit libcall
>> for __builtin_xxx when the target has no builtint support.
> 
> It of course does.
> 
> Richard.
Regards


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]