On Fri, Aug 20, 2021 at 12:56 PM Lance Fredrickson <lance@xxxxxxxxxxxxxxxxxxxxx> wrote: > > I'm trying to troubleshoot this issue I have. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246 > > runtime.inc used for golang is missing a couple struct definitions. I > want to see how runtime.inc.raw is generated, because runtime.inc is > derived from it. I think this could be an easy fix, but it's tricky > navigating gcc code for the first time. runtime.inc.raw is generated when the runtime package is compiled. When compiling the runtime package to produce runtime.lo, the option -fgo-c-header=runtime.inc.raw is passed to the compiler. The implementation of that option is mainly the function Gogo::write_c_header in gcc/go/gogo.cc. That said the right place to fix this problem is most likely the shell script libgo/mkruntimeinc.sh, which already strips out various types that don't work for one reason or another. See the shell variable TYPES. Rather than trying to define the missing types, just remove the types that refer to them. Ian