[U-Boot] x86 build is broken with GCC 7

Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?

On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.

On Tue, Jun 20, 2017 at 11:41 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.
This is important; it works with GCC 6 but fails with GCC 7. Khem, is it possible for you to help here?

+Bin
On 20 June 2017 at 08:47, Otavio Salvador otavio.salvador@ossystems.com.br wrote:
On Tue, Jun 20, 2017 at 11:41 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.
This is important; it works with GCC 6 but fails with GCC 7. Khem, is it possible for you to help here?
-- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Hi,
On Tue, Jun 20, 2017 at 10:54 PM, Simon Glass sjg@chromium.org wrote:
+Bin
On 20 June 2017 at 08:47, Otavio Salvador otavio.salvador@ossystems.com.br wrote:
On Tue, Jun 20, 2017 at 11:41 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
Yes. It's all about multilib.
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.
If we want to use 64-bit GCC to build 32-bit U-Boot, GCC must ship with multilib support.
Regards, Bin

On Tue, Jun 20, 2017 at 12:19 PM, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Jun 20, 2017 at 10:54 PM, Simon Glass sjg@chromium.org wrote:
+Bin
On 20 June 2017 at 08:47, Otavio Salvador otavio.salvador@ossystems.com.br wrote:
On Tue, Jun 20, 2017 at 11:41 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
Yes. It's all about multilib.
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.
If we want to use 64-bit GCC to build 32-bit U-Boot, GCC must ship with multilib support.
Ohhh I see. I will check if I can reproduce it inside OE, otherwise we should be good.

On Tue, Jun 20, 2017 at 7:47 AM Otavio Salvador < otavio.salvador@ossystems.com.br> wrote:
On Tue, Jun 20, 2017 at 11:41 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Jun 14, 2017 at 09:53:37AM -0300, Otavio Salvador wrote:
Hello folks,
Testing with current compiler exposed an error:
arch/x86/lib/built-in.o: In function `__wrap___udivdi3': /home/otavio/src/u-boot/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Is it a known issue?
These functions come from libgcc so it seems you are not having libgcc specified or its missing completely sometimes it depends on compiler versions code generation whether it will generate calls to helpers from libgcc or not Important question is if uboot links with libgcc or not if it doesn't then you have to rewrite the code so that it doesn't generate the calls to this helper function or have it implemented in uboot code
Yes, building the 32bit x86 targets with a 64bit default gcc at least doesn't work. I actually forgot until the other day that I had just been relying on travis-ci for that part of my build testing.
This is important; it works with GCC 6 but fails with GCC 7. Khem, is it possible for you to help here?
-- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
participants (5)
-
Bin Meng
-
Khem Raj
-
Otavio Salvador
-
Simon Glass
-
Tom Rini