From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D8623857C4E; Sat, 17 Oct 2020 15:51:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8623857C4E From: "daniel.santos at pobox dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/68931] gccgo fails to build using MUSL libc Date: Sat, 17 Oct 2020 15:51:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.santos at pobox 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: attachments.created Message-ID: In-Reply-To: References: 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: Sat, 17 Oct 2020 15:51:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D68931 --- Comment #5 from Daniel Santos --- Created attachment 49393 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49393&action=3Dedit Patch for musl compatibility The root problem is that musl defines off64_t and loff_t as preprocessor macros. These end up in gen-sysinfo.go as "// undefinedmacro" entries.=20 Perhaps the real solution would be for -fdump-go-spec to attempt to determi= ne when a macro is for a type? There is also a problem currently with struct sysinfo being defined multiple times due to musl defining it in sys/sysinfo.h instead of including linux/sysinfo.h -- I've just altered the musl header for now.=