This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

GCC Does Not Look At libc.a for PowerPC-EABI


Sorry if this comes through twice.  I sent it 2 days ago and have not seen
it on this list.

I am trying to configure GCC as a cross compiler from Linux 2.0.36 (Red Hat
5.3) to a PowerPC 604 VME embedded processor.  Following the procedure from
the Cygnus web page http://sourceware.cygnus.com/ecos/install-linux.html, I
used the target name "powerpc-eabi".

When I finished the installation, I tried to compile and link the following
simple test:
---
#include <string.h>
int main ()
{
char *string_1 = "String number 1";
size_t string_length;

string_length = strlen ( string_1);

if (string_length == 0)
{

return 0;

}

else
  {

return 1;

  }
}
---

The linker gives me the following message:

---
$/usr/local/cygnus/ecosSWtools-990319/H-i686-pc-linux-gnu/bin/powerpc-eabi-g
cc  test_ppc.c
/usr/local/cygnus/ecosSWtools-990319/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc
-eabi/2.9-ecosSWtools-990319/../../../../powerpc-eabi/bin/ld: warning:
cannot find entry symbol _start; defaulting to 01800074
/tmp/cca166161.o: In function `main':
/tmp/cca166161.o(.text+0x28): undefined reference to `strlen'
collect2: ld returned 1 exit status
---

The instructions I am following are for configuring eCos, but I am trying
to run on a bare board (no operating system per se; just the standard
libraries, as implemented in Newlib), at least for now.

It appears that the powerpc-eabi configuration does not have the -lc option
provided to the linker, but I am not at all familiar enough with the
configuration files to be sure.  Newlib is built as part of the cygnus
build process, and strlen is in libc.a (according to "nm -s").

Is there an easy way to fix this, or do I need to create a completely new
configuration (modifying "configure" and creating a new ".h" file in
config/rs6000) for this type of system?  Thanks.

Roger Racine

Roger Racine
Draper Laboratory, MS 31
555 Technology Sq.
Cambridge, MA 02139, USA
617-258-2489

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


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