Last steps towards a functional toolchain

Jan-Benedict Glaw jbglaw at lug-owl.de
Sun Oct 9 07:50:53 UTC 2005


On Sun, 2005-10-09 00:02:47 -0400, Mike Frysinger <vapier at gentoo.org> wrote:
> On Saturday 08 October 2005 04:48 pm, Jan-Benedict Glaw wrote:
> >  o Install uClibc's header files
> > 	How is this done?
> 
> `make install` ? :)

That's easy .-)

> >  o Recompile gcc to use these headers and (even more important) to
> >    generate a correct linker call for the -static case. (For now, I've
> >    not hacked the dynamically linked path because I first wanted to
> >    get the compile-time linker to work.)
> 
> we use buildroot to do this usually ...

I think you misunderstood me here...

My newly compiled gcc does know about "VAX" and how to generate ELF
object file for this processor, but it doesn't know about uClibc and
how to fetch which libc.a from where.

So I cheated about the linking stage and did it all by hand:

${VAX_DIR}/install/usr/bin/vax-linux-uclibc-ld                                  \
        -static -o main_vax                                                     \
        ${VAX_DIR}/src/uclibc/lib/crt1.o                                        \
        ${VAX_DIR}/src/uclibc/lib/crti.o                                        \
        ${VAX_DIR}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/crtbeginT.o       \
        main_vax.o                                                              \
        --start-group ${VAX_DIR}/src/uclibc/lib/libc.a                          \
        ${VAX_DIR}/src/uclibc/lib/libm.a                                        \
        ${VAX_DIR}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/libgcc.a          \
        --end-group ${VAX_DIR}/src/uclibc/lib/crtn.o

...because I know the pathes.

Though, GCC doesn't and I guess I need to tell it. This is
vax-linux-uclibc-gcc -static -v  output (edited for readability):

BASE=/home/jbglaw/vax-linux/scm/build-20051008-211533-vax-linux-uclibc
$BASE/install/usr/libexec/gcc/vax-linux-uclibc/4.1.0/collect2	\
	crt1.o crti.o \
	${BASE}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/crtbeginT.o	\
	-L${BASE}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0	\
	-L${BASE}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/../../../../vax-linux-uclibc/lib
	-L/tmp/ccMQhuqS.o --start-group -lgcc -lc --end-group	\
	${BASE}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/crtend.o	\
	crtn.o	\
	${BASE}/install/usr/lib/gcc/vax-linux-uclibc/4.1.0/../../..
/../vax-linux-uclibc/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status

So from a first glance, it should work if I install libc.a (from
uClibc) to $BASE/install/usr/lib/ .  The same for the crt stuff. (Side
node: for sure crt1, crti, crtbeginT crtend and crtn are abbreviations
for something. Who could tell me about their meaning?)

> tar up your custom uClibc source code:
> tar -jcf uClibc-snapshot.tar.bz2 uClibc
> then put that into the buildroot 'dl' dir and select the uClibc snapshot 
> option in the toolchain menu
> 
> what is your target ? v850 right ? is the target tuple 'v850-linux-uclibc' or 

Nope, it's really VAX. VAX is a CPU type developed some 30 years ago
(and buried about 10 years ago), while the NEC V850 is a modern
microcontroller.

> 'vax-linux-uclibc' or ... ? i can update the buildroot config files for you 
> so that vax is added to the arch list ...

I'll work on buildroot after my initial compiler works. With your last
hints, I hope that should do really soon now. Thanks!

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20051009/431262c1/attachment-0002.pgp 


More information about the uClibc mailing list