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

2009-03-27 Thread Gunther Nikl
Bernd Roesch schrieb: without changed headers old ompiler and libs do not work, because for C there is no sqrtf and other C99 funcs and many C++ programs get also many errors. Ok, you are trying to add C99 functions to your libc. Apparently you made a mistake if you get linker errors. i see o

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

2009-03-22 Thread Bernd Roesch
Hallo Gunther Am 22.03.09 schriebst Du > How about using the original C-library of your system together with its > headers? After all the version you are currently using is an "alien" and without changed headers old ompiler and libs do not work, because for C there is no sqrtf and other C99 func

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

2009-03-22 Thread Gunther Nikl
Bernd Roesch wrote: 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

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

2009-03-10 Thread Ian Lance Taylor
Bernd Roesch writes: > 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 ? This is in optabs.

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

2009-03-10 Thread Gabriel Dos Reis
On Tue, Mar 10, 2009 at 7:58 AM, Bernd Roesch wrote: > 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 GC

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

2009-03-10 Thread Bernd Roesch
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 /* Defi

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

2009-03-09 Thread Gabriel Dos Reis
On Mon, Mar 9, 2009 at 9:03 AM, Richard Guenther 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. Then, Bernd's report appears to be a mystery. -- Gaby

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

2009-03-09 Thread Richard Guenther
On Mon, Mar 9, 2009 at 3:59 PM, Gabriel Dos Reis wrote: > On Mon, Mar 9, 2009 at 7:11 AM, Bernd Roesch 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 >

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

2009-03-09 Thread Gabriel Dos Reis
On Mon, Mar 9, 2009 at 7:11 AM, Bernd Roesch 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_ c

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

2009-03-09 Thread Bernd Roesch
Hello Gabriel On 09.03.09, you wrote: > 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. But it dont work.

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

2009-03-09 Thread Gabriel Dos Reis
On Mon, Mar 9, 2009 at 2:42 AM, Bernd Roesch 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 th

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

2009-03-09 Thread Bernd Roesch
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

Re: lrint lrintf problems

2009-03-06 Thread Richard Guenther
On Fri, Mar 6, 2009 at 12:27 PM, Bernd Roesch wrote: > Hi, > > I see in compiler source there is in builtin.c lrint lrintf.so the gcc need > no extern linker lib when i understand right. > > But get linker error when use them.I test compiler 3.4.0 4.3.2 and 4.4.0 > > I also link with libgcc.but do