From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52139 invoked by alias); 29 Sep 2017 12:56:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 52024 invoked by uid 89); 29 Sep 2017 12:56:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yw0-f174.google.com Received: from mail-yw0-f174.google.com (HELO mail-yw0-f174.google.com) (209.85.161.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Sep 2017 12:56:16 +0000 Received: by mail-yw0-f174.google.com with SMTP id q80so775821ywg.2 for ; Fri, 29 Sep 2017 05:56:16 -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:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=6aXlVcR9sRKwR6jvIgJPZonHU3E/a37RQTkr8DMpg10=; b=nPxTb3jddKi139GzMw7NHkwNiCZ2aTQ4JkfxYF2LlafP1MJ9X8jiE4Y47x6mguhffH dG8rh+6CuppzyomSsV5f78QL0Pzzhq7XKofuORpLs4oaIgCu/d4rl/f8Tvqpt0mgR0eH J1SKX+KVFGubcySZxvdB5pdZH1Cmi8L/LFMemBbfDobSsaFnKBrrYE8PvxWwE8oMhl0f IW2kOBLodL6+MR/Wrm3GiKdOyd2adhzfQyJ7IKLX/TYzVyC8vLF30fMI0QluzLu/nNnd YlqWzXoFvc9SCmFErgx/8nFrIhhC+XCz5biwy54v2fUzRVPC0MsgRfvNK/iwWePJQC5z FWMg== X-Gm-Message-State: AHPjjUimND6ZLEX0mPz8IJh+b6MvxGJYqCUuj1d0s/IXuSLXVqMMJjZh 3EAOhBZt0dQaElglm5lrkt1bX2V2n0AxFG5dyWoPiw== X-Google-Smtp-Source: AOwi7QAzvMTB4JB4xBxj9IasDvu5qyS5FswZafspYhrJNtx36eWC5RVCEj3xxTPCq2vW4rXwTMlWs9zU1IlwSAehTmA= X-Received: by 10.129.62.23 with SMTP id l23mr6236665ywa.174.1506689774918; Fri, 29 Sep 2017 05:56:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.108.79 with HTTP; Fri, 29 Sep 2017 05:56:14 -0700 (PDT) In-Reply-To: References: From: Ian Lance Taylor Date: Fri, 29 Sep 2017 12:56:00 -0000 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BLIBGO_PATCH=5D_Fix_compilation_error_against_uCli?= =?UTF-8?Q?bc=2Dng=3A_runtime=5Fsysinfo=2Ego=3A_error=3A_use_of_undefined_type_=E2=80=98=5F?= =?UTF-8?Q?=5F=5Fuclibc=5Flocale=5Fstruct=E2=80=99?= To: Alex Potapenko Cc: gcc-patches , Waldemar Brodkorb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg01940.txt.bz2 On Fri, Sep 29, 2017 at 1:38 AM, Alex Potapenko wrot= e: > > Building GCC 7.2.0 libgo against uClibc-ng 1.0.26 results in the following > error: > >> runtime_sysinfo.go:418:17: error: use of undefined type >> =E2=80=98___uclibc_locale_struct=E2=80=99 > > > This happens because -fdump-go-spec probably generates types only from > typedef declarations, ignoring structs, like "struct > __uclibc_locale_struct;" in uClibc-ng header. Addi= ng > "typedef struct __uclibc_locale_struct __uclibc_locale_struct;" to > libgo/sysinfo.c remedies this issue: > > --- a/libgo/sysinfo.c > +++ b/libgo/sysinfo.c > @@ -277,3 +277,7 @@ > epoll_data_offset =3D offsetof(struct epoll_event, data) > }; > #endif > + > +#ifdef __UCLIBC__ > +typedef struct __uclibc_locale_struct __uclibc_locale_struct; > +#endif -fdump-go-spec doesn't ignore structs, so I feel like there may be something else going on. Could you send the generated gen-sysinfo.go file (without your patch)? Thanks. Ian