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 gcc for an os less system


Hi,
   I am trying to build gcc for a system without an OS and using newlib as the C library. The build is for an xscale-elf target hosted on PC linux

I have done the following already

Build binutils

cd build-binutiils
../binutils-2.14/configure --target=xscale-elf --prefix=<bin-directory>/xscale-efl
make all install

Build gcc core

cd build-gcc-core
../gcc-3.1-core/configure --target=xscale-elf --prefix=<bin-direcotry>/xscale-elf --enable-languages=c --with-local-prefix=<bin-directory>/xscale-elf/xscale-elf --without-headers --with-newlib --disable-shared

Now I am about to build newlib. Since I am using a custom system with its own memory map, I know that I would have to write my own crt0.S, a linker script and also a syscall.c to handle some of the low level C library calls. 

I would like to know if 
1. I should use my own crt0.S and syscalls.c files inplace of newlibs before I build newlib or 

2. is there a way to first build newlib and also gcc for C++ and then somehow make the system use my crt0.o and syscalls.o which I compile with xscale-elf-gcc -c crt0.S -o crt0.o and xscale-gcc-elf -c syscalls.c -o syscalls.o (after building newlib and gcc for C++)

If I use 1., how do I know which crt0.S and syscalls.c to replace. There is one at newlib/libc/sys/arm/ and another at libgloss/arm/redboot-crt0.S. How do I know which is being used when building newlib?

I would really appreciate your answers

Thanks
Vish


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