[Skiboot] native build broken for some time
Dan Horák
dan at danny.cz
Wed Feb 5 05:33:37 AEDT 2025
On Tue, 4 Feb 2025 14:04:06 +0100
Dan Horák <dan at danny.cz> wrote:
> Hi,
>
> when working on the opal-prd.service change I have realized that it's
> not possible to build the "external" tools (opal-prd at least) using a
> host compiler any more due an conflict between local and system headers.
> Bisecting shows
> https://github.com/open-power/skiboot/commit/18c9b278e7473204ab5bef69e788a29f92a130c3
> as the culprit. I believe the "external" tools like opal-prd should be
> buildable using the host compiler as they are expected to run inside
> the user OS. I am going to look into it.
so the issue is that the newly introduced endian.h, respectively
ccan/endian/endian.h in includes, is not clean for use inside assembly
code which is the use case when compiling external/opal-prd/thunk.S. It
fails with
[sharkcz at ibm-p9b opal-prd]$ cc -m64 -I. -I../../include -I../../ -c thunk.S -o thunk.o
/usr/include/bits/types.h: Assembler messages:
/usr/include/bits/types.h:31: Error: unrecognized opcode: `typedef'
/usr/include/bits/types.h:32: Error: unrecognized opcode: `typedef'
/usr/include/bits/types.h:33: Error: unrecognized opcode: `typedef'
...
Before the mentioned commit it used the system <endian.h> which is safe
to use inside assembly.
As for the fix I think we could omit the #include <endian.h> and rely
on compiler built-in defines.
Dan
More information about the Skiboot
mailing list