https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87231
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pietro at gcc dot gnu.org
--- Comment #7 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to myself from comment #4)
> Created attachment 64933 [details]
> OpenBSD: Use GCC's own include files [PR87231]
>
> Getting GCC to build on cfarm220, I ran into the same issue:
>
> ../../../source-gcc/libatomic/fence.c:27:10: fatal error: stdatomic.h:
> No such file or directory
> 27 | #include <stdatomic.h>
> | ^~~~~~~~~~~~~
>
> ../../../source-gcc/libatomic/flag.c:27:10: fatal error: stdatomic.h: No
> such file or directory
> 27 | #include <stdatomic.h>
> | ^~~~~~~~~~~~~
>
> I'm attaching a patch, but I'm not going to formally propose/submit this, as
> there are way more issues down the line.
That was resolved by Pietro via commit
r17-3312-gd32c1f0238f33b0f6a3ef1b5b228678a92585094 "build: Add stdatomic.h to
USER_H on OpenBSD".
(In reply to myself from comment #5)
> Created attachment 64934 [details]
> OpenBSD: '__size_t is a typedef, must not trash it' in
> 'gcc/ginclude/stddef.h' [PR87231]
>
> As the build proceeds, we run into:
>
> In file included from [...]/build-gcc/gcc/include-fixed/stdlib.h:49,
> from
> [...]/build-gcc/x86_64-unknown-openbsd7.9/libstdc++-v3/include/cstdlib:83,
> from
> ../../../../source-gcc/libstdc++-v3/libsupc++/atexit_thread.cc:25:
> /usr/include/amd64/_types.h:123:18: error: declaration does not declare
> anything [-fpermissive]
> 123 | typedef unsigned long __size_t;
> | ^~~~
>
> Attaching a patch that just copies for OpenBSD what is done for other BSDs.
> Not validated any further.
I'm unclear on the state of that one; currently running into issues as
discussed here:
<https://inbox.sourceware.org/[email protected]> "Re:
[PATCH 3/3] fixincludes: Remove unnecessary OpenBSD fixes".