help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GccPowerpc eabi HowTo - probem with stido functions ( sprintf) attach an


From: Moshe Drori
Subject: GccPowerpc eabi HowTo - probem with stido functions ( sprintf) attach an Eclipse IDE example
Date: Thu, 27 Oct 2005 12:06:37 +0200

WARNING: possible mail bomb, NOT CHECKED FOR VIRUSES:
  Maximum number of files (500) exceeded at /usr/local/sbin/amavisd line 4893.
--- Begin Message --- Subject: GccPowerpc eabi HowTo - probem with stido functions ( sprintf) attach an Eclipse IDE example Date: Thu, 27 Oct 2005 12:06:37 +0200

Dear Sir,

Please your advice.I think such a problem with newlib...or with my gcc powerpc building process.or with the makefile see attach example ( also in the Zip) .

Please your remarks to the following procedure

A.  Under Cygwin - XP SP2 machine 

  Getting the following tar files than extract / cerate the following subdirectories under C:\ cygwin\gnu_src\  

  < binutils-2.16.1> <gcc-4.0.2>  <gdb-6.3>  <newlib-1.13.0>

  Pease your remarks to the building  procedure

  1.   binutils-2.16.1    - ftp://mirror.switch.ch/mirror/gnu/binutils/ extract / create subdirectory

             C:\ cygwin\gnu_src\binutils-2.16.1   
         $./configure  --target=powerpc –eabi
           # maks
           # make install

  2.   gcc-4.0.2  -
ftp://mirror.switch.ch/mirror/gnu/gcc/ extract / create subdirectory
   
      Create a spraete directory GccPowerpc   create subdirectory

 
     C:\ cygwin\gnu_src\GccPowerpc - 
      $../gcc –4.0.2/configure --target=powerpc-eabi –-enable –languages=”c”

           # maks
           # make install

 3.    gdb-6.3.      -
ftp://mirror.switch.ch/mirror/gnu/gdb/    extract / create subdirectory
    C:\ cygwin\gnu_src\gdb-6.3-  
    $./configure --target=powerpc –eabi
           # maks
           # make install

  4.    newlib-1.13.0. -
http://sourceware.org/newlib/ extract / create subdirectory
     C:\ cygwin\gnu_src\gdb-6.3-  
   $./configure --target=powerpc –eabi
           # maks
           # make install


The following example caused to a following linker problem

  char buff[20];
 sprintf (buff, "%s%d", "my_test",100);

/usr/local/bin/../powerpc-eabi/lib/libc.a(vfprintf..o)(.text+0x18a0): In function `_vfprintf_r':
../../../.././newlib/libc/stdio/vfprintf.c:1065: undefined reference to `__umoddi3'
/usr/local/bin/../powerpc-eabi/lib/libc.a(vfprintf.o)(.text+0x18bc):../../../.././newlib/libc/stdio/vfprintf.c:1066: undefined reference to `__udivdi3'
/usr/local/bin/../powerpc-eabi/lib/libc.a(makebuf.o)(.text+0x12c): In function `__smakebuf':
../../../.././newlib/libc/stdio/makebuf.c:96: undefined reference to `isatty'
/usr/local/bin/../powerpc-eabi/lib/libc.a(sbrkr.o)(.text+0x40): In function `_sbrk_r':
../../../.././newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/bin/../powerpc-eabi/lib/libc.a(writer.o)(.text+0x48): In function `_write_r':
../../../.././newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/bin/../powerpc-eabi/lib/libc.a(closer.o)(.text+0x40): In function `_close_r':
../../../.././newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/bin/../powerpc-eabi/lib/libc.a(fstatr.o)(.text+0x44): In function `_fstat_r':
../../../.././newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/bin/../powerpc-eabi/lib/libc.a(lseekr.o)(.text+0x48): In function `_lseek_r':
../../../.././newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/bin/../powerpc-eabi/lib/libc.a(readr.o)(.text+0x48): In function `_read_r':
../../../.././newlib/libc/reent/readr.c:58: undefined reference to `read'
make: *** [ADLAP.elf] Error 1


Only this example  working well only without %d – It’s insignificant for me
sprintf (buff, "%s", "my_test");


powerpc-eabi-ld -Map ADLAP.map -o ADLAP.elf  appl.o main.o hardware.o init.o  -T lnk_mpc555_rom.lcf -L c:/555/libumas -lumas -lm -lc
powerpc-eabi-objcopy -O srec ADLAP.elf ADLAP.rom
powerpc-eabi-objdump -Sx ADLAP.elf > ADLAP.dump

what can be the problam ?

I build a sample IDE - Eclipse - which demonstrated the problem only a main which contain sprintf command.

This simple build project  which generate the same errors as our operational project

I'll appreciated if u can take a look on the Zip attachment open it, and see what can be  wrong (TestEnvironment.zip)

 Maybe  I miss something following the building the GCC for powerpc -Regarding to GCC-Powerpc

 Looking  forwarded to your response asap.

Moshe Drori

 

Attachment: test-sprintf Eclipse Env Fail.JPG
Description: JPEG image

Attachment: test-sprintf Eclipse Env OK.JPG
Description: JPEG image

Attachment: TestEnvironment.zip
Description: Binary data

Attachment: Makefile
Description: Binary data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]