This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


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

Compiling Newlib for ARM


Hi.

I am trying to cross-compile Newlib 1.17.0 for ARM using an i386 

PC with Ubuntu.

First I built the cross-compiler (gcc 4.4.1), 

excluding the parts that need the host's libc. The configure options 

were 

--target=arm-unknown-linux-gnu --host=i686-pc-linux-gnu --

prefix=/usr/local/gcc-4.4.1-glibc-2.3.6/arm-unknown-linux-gnu/arm-

unknown-linux-gnu --disable-multilib --with-newlib --without-headers --

disable-nls --enable-threads=no --enable-symvers=gnu --enable-

__cxa_atexit --enable-languages=c --disable-shared

Then I added the 

directory with the newly-built cross-compiler to the path, went to the 

folder ~/newlib-1.17.0/newlib and typed

CC=arm-unknown-linux-gnu-gcc .
/configure --host=arm-unknown-linux-gnu
make

There was an error in 

compiling in libc/sys/arm/, the file newlib.h was not found. I worked 

around that by manually editing libc/sys/arm/Makefile: the line



NEWLIB_CFLAGS =  -O2 -DARM_RDI_MONITOR -fno-builtin

became


NEWLIB_CFLAGS =  -I~/newlib-1.17.0/newlib/targ-include -O2 -

DARM_RDI_MONITOR -fno-builtin

(there is some stuff CC_FOR_NEWLIB 
including the right targ-include directory somewhere in the makefiles, 

but for some reasons it does not work)

But the most serious problem 
is: apparently the gcc cross-compler needs the file crt1.o, and that 
is 
not built by Newlib. newlib/libc/sys/linux contains a crt1.c, but 
that directory is not built at all because, for ARM targets, 
newlib/libc/sys/arm is the only subdirectory of sys/ that is built.



How should I do that?

Regards,
Fabrizio



Passa a Tiscali Tutto Incluso Light: telefono + adsl 8 Mb senza limiti a soli 9,95 euro al mese fino al 01/04/2010. Gratis la Sim Tiscali Mobile con 25 euro di traffico.

Lâofferta à valida solo se attivi entro il 12/11/09 

http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso_light/?WT.mc_id=01fw


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