dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: ARM toolchain

Re: ARM toolchain

From: Boris Gjenero via rockbox-dev <>
Date: Wed, 4 May 2016 20:28:31 -0400

On 2016-05-02 05:18 PM, Amaury Pouly via rockbox-dev wrote:
> Hi fellow developers,
> I noticed that the ARM toolchain compilation is broken with newer GCCs.
> So I intend to push this patch:
> that comes together with this:
> I am confident the patch is good because it does not come from me ;)
> That being said, it would be nice if some of could double-check if you
> can build the ARM toolchain with this new patch and report the result
> (along with your system GCC version). My system gcc is 5.3.1

Using GCC 5.3.1-14ubuntu2 on Ubuntu 16.04 x86_64 I confirm
without the patch runs into errors:

> ../../gcc-4.4.4/gcc/toplev.c: At top level:
> ../../gcc-4.4.4/gcc/toplev.c:536:1: error: redefinition of ‘floor_log2’
> floor_log2 (unsigned HOST_WIDE_INT x)
> ^
> In file included from ../../gcc-4.4.4/gcc/toplev.c:58:0:
> ../../gcc-4.4.4/gcc/toplev.h:190:1: note: previous definition of ‘floor_log2’ was here
> floor_log2 (unsigned HOST_WIDE_INT x)
> ^
> ../../gcc-4.4.4/gcc/toplev.c:571:1: error: redefinition of ‘exact_log2’
> exact_log2 (unsigned HOST_WIDE_INT x)
> ^
> In file included from ../../gcc-4.4.4/gcc/toplev.c:58:0:
> ../../gcc-4.4.4/gcc/toplev.h:196:1: note: previous definition of ‘exact_log2’ was here
> exact_log2 (unsigned HOST_WIDE_INT x)

Compilation with the patch works. After getting the errors and adding
the patch I first got link time errors, but it worked after a "make clean".

The removal of #ifdef CLZ_HWI and #ifdef CTZ_HWI code is not needed for
successful building. That changes floor_log2() and exact_log2() from
code based on one of the __builtin_clz functions to alternative code.
I'm left wondering what is the reason for that change.

My old compiler, a new one with this patch, and a new one without the
#ifdef code removal all produce the exact same ipodvideo rockbox.bin.

Best regards,

Received on 2016-05-05

Page was last modified "Jan 10 2012" The Rockbox Crew