[Buildroot] Buildroot-generated ARM toolchain can't compile kernel
thomas.petazzoni at free-electrons.com
Fri Sep 12 14:57:10 UTC 2008
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 :
This toolchain is not able to build a ARM kernel (2.6.25), it fails at
link time complaining about __udivdi3 not being present:
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 ?
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
More information about the buildroot