public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@golang.org>
To: Lance Fredrickson <lance@bonnevillemachine.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Trying to find where golang runtime.inc.raw is generated
Date: Fri, 20 Aug 2021 13:39:57 -0700	[thread overview]
Message-ID: <CAKOQZ8w762itNQSbad9J4jr+cn7kLpN7=Wk6Twug2OQtHm9fJg@mail.gmail.com> (raw)
In-Reply-To: <d5526936-9e39-3880-148b-943e1c2e4567@bonnevillemachine.com>

On Fri, Aug 20, 2021 at 12:56 PM Lance Fredrickson
<lance@bonnevillemachine.com> 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

      reply	other threads:[~2021-08-20 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 19:56 Lance Fredrickson
2021-08-20 20:39 ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKOQZ8w762itNQSbad9J4jr+cn7kLpN7=Wk6Twug2OQtHm9fJg@mail.gmail.com' \
    --to=iant@golang.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=lance@bonnevillemachine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).