This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: i686 -> powerpc gcc 2.95.3 trouble


Cameron, Steve wrote:

> I wrote:
> 
> 
>>I'm having some trouble with a gcc 2.95.3 cross 
>>compiler I built for powerpc (405GP "walnut" in 
>>this case)
>>
> 
> Hmm.  The problem appears to be related to floating 
> point operations.  I was doing something along the
> lines of:
> 
> 	long totalsize;
> 	totalsize = (long) (x / 512.0);
> 
> 	my_func(x,y,z, totalsize);
> 
> It actually was blowing up in the assignment, but
> I fooled myself because, a) originally, the calculation
> was inline in the function call, I put in totalsize
> thinking maybe the calculation was the problem, then
> on taking out totalsize from the function call, 
> the problem went away.
> 
> But that was only because taking out totalsize from
> the function call caused the optimizer to take out
> the floating point stuff too.
> 
> naturally, the innocent looking stuff is the problem.
> 
> Also explains why the kernel compile 
> works, there's no floating point in there.
> 
> Thanks.
> 
> -- steve


I don't think the 405GP has hardware floating point, does it?

Make sure you compile everything with -msoft-float. I ran into

this problem on a project not too long ago.

	-Bill




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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