Skip to contentSkip to conversation

Buildroot-generated ARM toolchain can't compile kernel

Buildroot Thomas Petazzoni 1 participant 1 message Sep 12, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

With a recent Buildroot checkout (a few days ago), I've generated a toolchain for ARM, with gcc 4.2.4 and uclibc 0.9.29. My buildroot configuration is available at :

http://toulibre.org/~thomas/buildroot/buildroot-config-arm-udivdi3-problem

This toolchain is not able to build a ARM kernel (2.6.25), it fails at link time complaining about __udivdi3 not being present:

LD vmlinux
net/built-in.o: In function `rt_worker_func':
stats.c:(.text+0x1f7cc): undefined reference to __udivdi3' stats.c:(.text+0x1f86c): undefined reference to __udivdi3' stats.c:(.text+0x1f884): undefined reference to __udivdi3' stats.c:(.text+0x1f9b4): undefined reference to __udivdi3'
make: *** [vmlinux] Error 1

If I build the exact same kernel with an ARM toolchain generated by Buildroot, but using gcc 3.4.5 and uclibc 0.9.28, it compiles fine.

When objdumping the kernel, the function rt_worker_func() really makes some calls to __udivdi3, which shouldn't happen since the kernel uses a do_div() macro and should never use any function of libgcc.

Any idea of what is happening ?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com