This is the mail archive of the gcc-bugs@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]

[Bug target/16314] New: EP9312 gcc: undefined reference to __divdf3


Trying to compile some simple floating point math using the Maverick Crunch
coprocessor on the EP9312 breaks because the divide functions end up in the
assemby but aren't in libcc. As far as I understand it, the problem stems from
the Crunch core not supporting floating point divide, and then we get into ABI
differences (returning values in integer/float point registers). More (accurate)
information can be found in the thread on the gcc ml:

thread start: http://gcc.gnu.org/ml/gcc/2004-06/msg01867.html
continued into the next month: http://gcc.gnu.org/ml/gcc/2004-07/msg00028.html


simple test case to reproduce the problem:

double x, y;  float a, b;
int main () { a = a/b; x = x /y; return 0; }

compiler commandline and output:

# arm-ep93xx-linux-gnu-gcc bug.c -Wall -nostdlib                               
                                                                                   
/home/larstiq/crosstool/arm-ep93xx-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/../lib/gcc/arm-ep93xx-linux-gnu/3.4.0/../../../../arm-ep93xx-linux-gnu/bin/ld:
warning: cannot find entry symbol _start; defaulting to 0000807
/tmp/cc8FEzYi.o(.text+0x20): In function `main':                               
                                                                               
                                                     
: undefined reference to `__divsf3'                                            
                                                                               
                                                     
/tmp/cc8FEzYi.o(.text+0x40): In function `main':
: undefined reference to `__divdf3'                                            
                                                                               
        
collect2: ld returned 1 exit status

# arm-ep93xx-linux-gnu-gcc -v                                                  
                                                                                
Reading specs from
/home/larstiq/crosstool/arm-ep93xx-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/../lib/gcc/arm-ep93xx-linux-gnu/3.4.0/specs
                                                                               
Configured with: ../gcc-3.4.0/configure --target=arm-ep93xx-linux-gnu
--host=powerpc-linux
--prefix=/opt/crosstool/arm-ep93xx-linux-gnu/gcc-3.4.0-glibc-2.3.2
--with-local-prefix=/opt/crosstool/arm-ep93xx-linux-gnu
Thread model: single                                                           
                                                                               
                                                     
gcc version 3.4.0

-- 
           Summary: EP9312 gcc: undefined reference to __divdf3
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter at vidicode dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: arm-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16314


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