This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help about Building Cygwin hosted newlib-based target toolchain


Hi! Wales Wang.

Newlib doesn't have default target.
So you must specify one.
like this:
gcc -myellowknife hello.c -o hello

- Sangmoon Kim -

----- Original Message ----- 
From: "Wales Wang" <wormwang@yahoo.com>
To: <crossgcc@sources.redhat.com>
Cc: <khan@nanotech.wisc.edu>
Sent: Wednesday, January 09, 2002 11:42 AM
Subject: Help about Building Cygwin hosted newlib-based target toolchain


> Hi! All
> 
> I have succeed on building the cross platform gcc
> environment after Mumit's howto.
> I used binutils 2.11.2,gcc 2.95.3,newlib-1.9.0.
> 
> But when I try a test c program in the howto
>   #include <stdio.h>
>   int 
>   main()
>   {
>     printf("hello world\n");
>     return 0;
>   }
> I encounter such error:
> 
> /usr/local/powerpc/powerpc-eabi/bin/ld: warning:
> cannot find entry symbol _start; defaulting to
> 01800074
> /cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/cckg9axq.o:
> In function `main':
> /cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/cckg9axq.o(.text+0x24):
> undefined reference to `printf'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi.o)(.got2+0x8):
> undefined reference to `__SDATA_START__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi.o)(.got2+0xc):
> undefined reference to `__SBSS_END__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi.o)(.got2+0x14):
> undefined reference to `__SDATA2_START__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi.o)(.got2+0x18):
> undefined reference to `__SBSS2_END__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi-ctors.o):
> In function `__do_global_ctors':
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0x1e):
> undefined reference to `__CTOR_END__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0x26):
> undefined reference to `__CTOR_LIST__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0x2a):
> undefined reference to `__CTOR_LIST__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0x2e):
> undefined reference to `__CTOR_END__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi-ctors.o):
> In function `__do_global_dtors':
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0xae):
> undefined reference to `__DTOR_LIST__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0xb6):
> undefined reference to `__DTOR_END__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0xba):
> undefined reference to `__DTOR_END__'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.text+0xbe):
> undefined reference to `__DTOR_LIST__'
> /usr/local/powerpc/lib/gcc-lib/powerpc-eabi/2.95.3/libgcc.a(eabi-ctors.o):
> In function `__do_global_ctors':
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.sdata+0x0):
> undefined reference to `__init'
> /cygdrive/c/unix/CrossGcc/BUILD/gcc/gcc/eabi-ctors.c(.sdata+0x4):
> undefined reference to `__fini'
> collect2: ld returned 1 exit status
> 
> Any one can help me?
> Thank you very much!
> 
> sincerely
> Wales Wang
> 
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> 
> 

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