From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BE86382E82E; Mon, 28 Jun 2021 19:17:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BE86382E82E From: "lancethepants at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng Date: Mon, 28 Jun 2021 19:17:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lancethepants at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 19:17:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101246 Bug ID: 101246 Summary: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: lancethepants at gmail dot com CC: cmang at google dot com Target Milestone: --- I've recently run into an issue building a go cross-compiler on x86_64 targeting an arm embedded device (Netgear R7000 router) starting with gcc 1= 1. I was previously able to build the cross-compiler (c,c++,go) under gcc 9 & = 10, but am getting the errors listed at the bottom. armv7 cortexa9 cpu (no fpu) uclibc-ng (latest) kernel 2.6.36.4. I don't think the old kernel is an issue because the same errors arise if I= use kernel 5.12.=20=20 I tried building with glibc, and it does work then. So I think the issue is with uclibc-ng. So I did use uclibc-ng with gcc 9 & 10 with success, but for some reason wi= th gcc 11 I am now running into this issue. My untrained eyes think it may be as easy as a couple missing structs within runtime.inc. Is runtime.inc generated? because it doesn't appear in unconfigured source I've notices. thanks, Lance Build Errors In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/go-main.c:17: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; |=