init hang after upgrading ARM-Linux toolchain

Creech, Matthew L
Mon Jun 19 16:47:00 GMT 2006

Martin Guy wrote:
> Hey, I've heard this one!
> Uboot uses the function raise() but the C library you are using only
> supplies kill(). So you write a tiny function that implements raise()
> that does kill(getpid(), sig) and link it in.
> Or -D'raise(n)=kill(getpid(),n)' in CFLAGS (seems to work
> with this gcc)

Thanks for the reply

This didn't fix the error, as kill() and getpid() were undefined as
well.  So I just added '-lc' to the Makefile, which was enough to pick
up raise() from libc.a (which is probably wrong, but it at least allows
U-Boot to link).  That didn't work on U-Boot 1.1.4, but when I tried on
the latest version from GIT, things seem to work okay at runtime.  So
maybe that did the trick, or maybe raise() never actually gets called.

I'm not sure whether the fault lies with U-boot, if it should be linking
in raise() from libc, or the toolchain, which references a libc function
from libgcc.  But either way it seems to be working fine now.  :)

Thanks again

Matthew L. Creech

For unsubscribe information see

More information about the crossgcc mailing list