BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001486 [uClibc] Architecture Specific major always 09-05-07 00:54 09-15-07 01:23
Reporter busyben View Status public  
Assigned To uClibc
Priority normal Resolution no change required  
Status closed   Product Version 0.9.28
Summary 0001486: powerpc: neither soft_float nor kernel emulated fpu working
Description I always get "illegal instruction" errors when trying to printf(%f, some_float_or_double). Since I use a embedded powerpc without fpu, I compiled uclibc with soft-float enabled (-msoft-float). But this does not seems to work.

Therefore I tried the floating point kernel-emulation in the linux kernel, which gives lots of warnings during compiling (see below 1.). After that, there is no illegal instruction anymore, but printf(%f,...) gives always 0.147484 (see 2.)

I am using OpenWrt with uClibc 0.9.28.2, Linux Kernel 2.6.22.1 together with a PowerPC 405 hard core in a Xilnix VirtexII Pro FPGA XC2VP30.

Is this a but in uClibc's soft-float AND/OR the kernels ppc/math-emu? What can I do to get fp-requiring applications running?
If this helps: when I try to run rrdtool, I also get an error about symbol 'rintf' (see 3.), although I compiled everything with option -fPIC.
Additional Information 1.:
  CC arch/powerpc/math-emu/fadd.o
arch/powerpc/math-emu/fadd.c: In function 'fadd':
arch/powerpc/math-emu/fadd.c:31: warning: right shift count is negative
arch/powerpc/math-emu/fadd.c:31: warning: left shift count >= width of type
arch/powerpc/math-emu/fadd.c:13: warning: 'R_e' may be used uninitialized in this function
arch/powerpc/math-emu/fadd.c:13: warning: 'R_f1' may be used uninitialized in this function
arch/powerpc/math-emu/fadd.c:13: warning: 'R_f0' may be used uninitialized in this function

2.:
root@192:/# float-test
Test whether math-emulation works or not:
print double -5.5 = 0.147484 ?
print double 1.25 = 0.147484 ?
print double pi = 0.147484 ?
print float -5.5 = 0.147484 ?
print float 1.25 = 0.15 ?
print float pi = 0.147484 ?
pi=4*atan(1)= 0.147484 ?
If this is right, soft-float seems to work!

3.:
root@192:/# rrdtool
R_PPC_REL24: Compile shared libraries with -fPIC!

rrdtool: symbol 'rintf': can't handle reloc type 0xa in lib '/usr/lib/librrd.so.2'
Attached Files  float-test.c [^] (693 bytes) 09-05-07 00:54

- Relationships

- Notes
(0002742)
vapier
09-15-07 01:23

this is a gcc/kernel problem, not uClibc
 

- Issue History
Date Modified Username Field Change
09-05-07 00:54 busyben New Issue
09-05-07 00:54 busyben Status new => assigned
09-05-07 00:54 busyben Assigned To  => uClibc
09-05-07 00:54 busyben File Added: float-test.c
09-15-07 01:23 vapier Note Added: 0002742
09-15-07 01:23 vapier Status assigned => closed
09-15-07 01:23 vapier Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker