From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Fri, 12 Sep 2008 16:57:10 +0200 Subject: [Buildroot] Buildroot-generated ARM toolchain can't compile kernel Message-ID: <20080912165710.3e5a0037@surf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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 -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com