qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build system: HOSTCC -m64?


From: Nicholas Piggin
Subject: Re: build system: HOSTCC -m64?
Date: Mon, 02 Dec 2024 15:43:34 +1000

On Sun Dec 1, 2024 at 3:54 PM AEST, Michael Tokarev wrote:
> Hi!
>
> I initially sent this to skiboot@ list, but it never appeared there.
> Truing qemu-ppc too.
>
> I stumbled across a somewhat stupid "issue", - while building skiboot
> as part of qemu package build in debian, I tried running the build on
> an i386 host (usually I do this on amd64 or aarch64 host).  And skiboot
> build failed:
>
> In file included from /usr/lib/gcc/i686-linux-gnu/12/include/stdint.h:9,
>                   from roms/skiboot/ccan/short_types/short_types.h:4,
>                   from roms/skiboot/extract-gcov.c:5:
> /usr/include/stdint.h:26:10: fatal error: bits/libc-header-start.h: No such 
> file or directory
>
> This is ${HOSTCC}, not ${CC} - which is supposed to be a compiler for
> native architecture - it is building a helper binary to generate some
> build-time tables, so any native/default architecture is fine.
>
> However, skiboot build procedure tries to force -m64 flag to the
> default/native ${HOSTCC}:
>
>   Makefile.main: HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-m64)
>
> And on i386, native gcc does support this option.  But it does no
> necessary have all the headers/libraries to actually build any 64bit
> executable - which is exactly the case here.

Yeah, I think you have a point. Should fix it.

extract-gcov.c should be fixed for 32-bit host, and -m64 flag
removed. If you just remove -m64 I assume you hit the type
errors that the original issue reported?

Thanks,
Nick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]