[U-Boot] Building for da830 fails

Nick Thompson
2010-05-07T15:02:35Z

On 07/05/10 15:14, Nick Thompson wrote:
> On 07/05/10 12:57, Sudhakar Rajashekhara wrote:
>> Hi,
>>
>> I am using U-Boot from http://git.denx.de/?p=u-boot.git;a=summary and trying to build for da830. But my build fails with following
>> error:
>>
>> [...]
>> /../lib/gcc/arm-none-linux-gnueabi/4.4.1 -lgcc -Map u-boot.map -o u-boot
>> ../lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
>> ../lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
>> ../lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
>>
>> I am using gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202). I also tried with gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203), but
>> there also I am seeing the same error. I am using "da830evm_config" as the configuration for building.
>>
>> Has anyone seen this kind of error while building U-Boot for ARM based architecture?
>
> I just pulled the latest main line source and ran:
>
> % CROSS_COMPILE=arm-none-linux-gnueabi- ./MAKEALL da830evm
> Configuring for da830evm board...
> /opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> /opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> /opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> make: *** [u-boot] Error 1
> /opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-size: './u-boot': No such file
>
> This did not happen when I last updated on March 22nd and
> I have not updated my tools at all.

Sorry to reply to self. I ran a git bisect session and I get:

52dbac69c27dee67a4c051b1055d93b0ac4e2062 is the first bad commit
commit 52dbac69c27dee67a4c051b1055d93b0ac4e2062
Author: Timur Tabi <timur@freescale.com>
Date: Tue Apr 13 13:16:02 2010 -0500

fix print_size printing fractional gigabyte numbers on 32-bit platforms

In print_size(), the math that calculates the fractional remainder of a number
used the same integer size as a physical address. However, the "10 *" factor
of the algorithm means that a large number (e.g. 1.5GB) can overflow the
integer if we're running on a 32-bit system. Therefore, we need to
disassociate this function from the size of a physical address.

Signed-off-by: Timur Tabi <timur@freescale.com>

:040000 040000 2469aed20d27e8d444f749bea2d99fb85d66a52a fee73c34d4eb4d9db3b8640909e519131e5222bf M lib

Is this the first use of long long on ARM...?

Nick.