Using newlib (was: [Efi332] Building newlib/libgloss for MPC555)

David Eicher sailors3
Mon Aug 8 03:16:00 UTC 2005


Well, I think I've partially answered my own questions.

1) Apparently there is no libgloss.a, rather five libs:

Libmbx.a
Libyk.a
Libmvme.a
Libnosys.a
Libsim.a

It appears the Make install I did in the libgloss directory put these libs
in my usr/local/powerpc-elf/lib directory, neat!

When I tried to build my target code I got unresolved references. So I added
a -lyk to my command to link and all the  unresolved references disappeared
except for one:

__errno

I found an example of an errno routine in rs6000, so added the code to one
of the routines I modified for libgloss. But now I try to "make" libgloss
again....., it says "no make file found", and "nothing to do". It appears
that after I built it the first time, it renamed the makefile to makefile.in
and now will no longer build. 

Can anyone suggest what is the correct way to make a change to libgloss?

Can anyone explain the differences between the five libs and suggest which
one I'm suppose to be using?

Thanks for any help you might be able to offer,

Dave

-----Original Message-----
From: efi332-bounces at diy-efi.org [mailto:efi332-bounces at diy-efi.org] On
Behalf Of David Eicher
Sent: Sunday, August 07, 2005 8:12 AM
To: efi332 at diy-efi.org
Subject: Using newlib (was: [Efi332] Building newlib/libgloss for MPC555)

I'm trying to build my target code using newlib now. I'm getting a linker
error. I'm wondering a few things:

1) After install of libgloss, should there be a libgloss.a in the libs
directory for building target code?

2) Do I need a -lgloss switch for my linker to link using libgloss, or does
it get picked up automatically?

Thanks, 

Dave


There errors I'm getting look like this:

Dave at Dell8400 /usr/local/zfi555FBMonitor
$ make
powerpc-elf-gcc -L/usr/local/powerpc-elf/lib
/usr/local/zfi555FBMonitor/bin/LED.o /usr/local/zfi555FBMonitor/bin/BIT.o
/usr/local/zfi555FBMonitor/bin/sci_io.o /usr/local/zfi555FBMonitor/bin/__me
m.o /usr/local/zfi555FBMonitor/bin/__ppc_eabi_init.o
/usr/local/zfi555FBMonitor/bin/5xx_board_init.o
/usr/local/zfi555FBMonitor/bin/startup.o
/usr/local/zfi555FBMonitor/bin/bbc.o /usr/local/zfi5
55FBMonitor/bin/dptram.o /usr/local/zfi555FBMonitor/bin/l2u.o
/usr/local/zfi555FBMonitor/bin/mios1.o /usr/local/zfi555FBMonitor/bin/qadc.o
/usr/local/zfi555FBMonitor/bin/qsmcm.o /usr/local/zfi55
5FBMonitor/bin/tcan.o /usr/local/zfi555FBMonitor/bin/tpu3.o
/usr/local/zfi555FBMonitor/bin/uimb.o
/usr/local/zfi555FBMonitor/bin/usiuclk.o
/usr/local/zfi555FBMonitor/bin/usiugpio.o /usr/local/zf
i555FBMonitor/bin/usiumem.o /usr/local/zfi555FBMonitor/bin/usiusys.o
/usr/local/zfi555FBMonitor/bin/usiutmr.o
/usr/local/zfi555FBMonitor/bin/exctable.o
/usr/local/zfi555FBMonitor/bin/excfuncs.o
/usr/local/zfi555FBMonitor/bin/appconfig.o
/usr/local/zfi555FBMonitor/bin/arch.o
/usr/local/zfi555FBMonitor/bin/pcmaster.o
/usr/local/zfi555FBMonitor/bin/main.o -o .x -melf32ppc -Wl -Tdebug.dld
-Wl,-Map=main.map -nostartfiles -lc -lm
/usr/local/powerpc-elf/lib/libc.a(makebuf.o)(.text+0x130): In function
`__smakebuf':
../../../../../newlib-1.13.0/newlib/libc/stdio/makebuf.c:96: undefined
reference to `isatty'
/usr/local/powerpc-elf/lib/libc.a(sbrkr.o)(.text+0x40): In function
`_sbrk_r':
../../../../../newlib-1.13.0/newlib/libc/reent/sbrkr.c:60: undefined
reference to `sbrk'
/usr/local/powerpc-elf/lib/libc.a(writer.o)(.text+0x48): In function
`_write_r':
../../../../../newlib-1.13.0/newlib/libc/reent/writer.c:58: undefined
reference to `write'
/usr/local/powerpc-elf/lib/libc.a(closer.o)(.text+0x40): In function
`_close_r':
../../../../../newlib-1.13.0/newlib/libc/reent/closer.c:53: undefined
reference to `close'
/usr/local/powerpc-elf/lib/libc.a(fstatr.o)(.text+0x44): In function
`_fstat_r':
../../../../../newlib-1.13.0/newlib/libc/reent/fstatr.c:62: undefined
reference to `fstat'
/usr/local/powerpc-elf/lib/libc.a(lseekr.o)(.text+0x48): In function
`_lseek_r':
../../../../../newlib-1.13.0/newlib/libc/reent/lseekr.c:58: undefined
reference to `lseek'
/usr/local/powerpc-elf/lib/libc.a(readr.o)(.text+0x48): In function
`_read_r':
../../../../../newlib-1.13.0/newlib/libc/reent/readr.c:58: undefined
reference to `read'
collect2: ld returned 1 exit status
make: *** [main.elf] Error 1

Dave at Dell8400 /usr/local/zfi555FBMonitor



_______________________________________________
Efi332 mailing list
Efi332 at diy-efi.org
http://lists.diy-efi.org/mailman/listinfo/efi332





More information about the Efi332 mailing list