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]

Building CrossGCC for ARM ...


HI All

Im trying to build an ARM toolchain hosted on Win2k+Cygwin

This is the procedure I used to build the toolchain:

1. Binutils 		(binutils-20011002-1)
2. Bootstrap GCC
3. Newlib		(newlib-1.10.0)
4. GCC			(gcc-2.95.3-5)
5. Insight		(insight-5.1.1)

I have the foll. problem

Code:
----------------------------------------------------------------------------------
#include <stdio.h>
#include <math.h>

int main()
{
	double a = 0.125;

    printf("Hello World!\n");

    a *= a;

    a = pow(2, a);

    return(0);
}
----------------------------------------------------------------------------------

Error:
----------------------------------------------------------------------------------
Administrator@VVISWANA-W2K /cygdrive/c/User/Ram/Code/gcctest
$ arm-elf-gcc -v -g Hello.c -o Hello.exe
Reading specs from /usr/local/lib/gcc-lib/arm-elf/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/cpp0.exe -lang-c -v -D__GNUC__=2 
-D__GN
UC_MINOR__=95 -Darm -Darm_elf -D__ELF__ -D__arm__ -D__arm_elf__ -D__ELF__ 
-D__ar
m -D__arm_elf -Acpu(arm) -Amachine(arm) -D__CHAR_UNSIGNED__ -g 
-D__ARM_ARCH_4T__
-D__APCS_32__ Hello.c /cygdrive/c/DOCUME~1/rram/LOCALS~1/Temp/cc1IC0Pl.i
GNU CPP version 2.95.3-5 (cygwin special) (ARM/ELF non-Linux)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/include
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/../../../../arm-elf/sys-include
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/../../../../arm-elf/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/../../../../include/g++-3
End of omitted list.
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/cc1.exe 
/cygdrive/c/DOCUME~1/rram/LOCAL
S~1/Temp/cc1IC0Pl.i -quiet -dumpbase Hello.c -g -version -o 
/cygdrive/c/DOCUME~1
/rram/LOCALS~1/Temp/ccE4j2qQ.s
GNU C version 2.95.3-5 (cygwin special) (arm-elf) compiled by GNU C version 
2.95
.3-5 (cygwin special).
/usr/local/bin/arm-elf-as -o 
/cygdrive/c/DOCUME~1/rram/LOCALS~1/Temp/ccUX6iCB.o
/cygdrive/c/DOCUME~1/rram/LOCALS~1/Temp/ccE4j2qQ.s
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5/collect2.exe -X -o Hello.exe 
/usr/local
/lib/gcc-lib/arm-elf/2.95.3-5/crtbegin.o 
/usr/local/lib/gcc-lib/arm-elf/2.95.3-5
/../../../../arm-elf/lib/crt0.o -L/usr/local/lib/gcc-lib/arm-elf/2.95.3-5 
-L/usr
/local/lib/gcc-lib/arm-elf/2.95.3-5/../../../../arm-elf/lib 
/cygdrive/c/DOCUME~1
/rram/LOCALS~1/Temp/ccUX6iCB.o -lgcc -lg -lc -lgcc 
/usr/local/lib/gcc-lib/arm-el
f/2.95.3-5/crtend.o
/cygdrive/c/DOCUME~1/rram/LOCALS~1/Temp/ccUX6iCB.o: In function `main':
/cygdrive/c/User/Ram/Code/gcctest/Hello.c:14: undefined reference to `pow'
collect2: ld returned 1 exit status

Administrator@VVISWANA-W2K /cygdrive/c/User/Ram/Code/gcctest
$
----------------------------------------------------------------------------------

I'm not sure why the linker cannot resolve the ref.

Can tell me with right build procedure?
I can send my build-script over, if someone wants to look at it ...

Thanks
Ram

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


------
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]