From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 018073858C3A for ; Fri, 20 Aug 2021 20:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 018073858C3A Received: by mail-lf1-x134.google.com with SMTP id o10so22975325lfr.11 for ; Fri, 20 Aug 2021 13:40:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mbf9cwAe1MNDhxlEW8yuh6P1pGH51m6XsIXtiYh7WBI=; b=mZW9hvZsI15IB9xRDERUGqZCAxK3gy0ckY/usKUliaa/PEobYydGq7Y8Xv1Oz1TD2V z9Px/47SF5nRx1eJTpBDk/Bhm06C6LLmIrOffI6Uk2RXLRCBEIX1Jrk7p6jg67CcBv49 2mctTWZjdd8Im3nN+TYDkADu0DEz7yuM/0vevKi12Fzucss4a9MQha52zDV68w2VS10f qfjLL0L5prfj6rC+BIkoLYOsk3DBV3B6DlQWCtz49CMDc3Xu2o9237G3Jt7EAlslvzv5 nD7iU9NVw16JO7uAL2TamQ4IgJHZTBfsPg1Hr/nwTg9v8u4vbvu+ynCpHWwoqKsRsrOQ tErQ== X-Gm-Message-State: AOAM532rTGbvqneVh7SUwMv9VMeTd966DXmBKd7aYjwUL/y+VjlAGT2r M/3y24uenrItYIlteGoGIDwIqI+INd4ZZHgsokXaELU7/k2zDg== X-Google-Smtp-Source: ABdhPJxXx0Yjv1CEDhwPbwAL/pOg9BueE6CFq4BV2/b8gjpj5Br+jsSPae5/P341l3/Zn4M6EzWV4KKiVnosLzBtchc= X-Received: by 2002:ac2:5d67:: with SMTP id h7mr16385586lft.639.1629492009190; Fri, 20 Aug 2021 13:40:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ian Lance Taylor Date: Fri, 20 Aug 2021 13:39:57 -0700 Message-ID: Subject: Re: Trying to find where golang runtime.inc.raw is generated To: Lance Fredrickson Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 20:40:21 -0000 On Fri, Aug 20, 2021 at 12:56 PM Lance Fredrickson 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