This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LIBGO PATCH] Fix compilation error against uClibc-ng: runtime_sysinfo.go: error: use of undefined type ‘___uclibc_locale_struct’
- From: Alex Potapenko <opotapenko at gmail dot com>
- To: Ian Lance Taylor <iant at golang dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Waldemar Brodkorb <wbx at uclibc-ng dot org>
- Date: Fri, 29 Sep 2017 17:08:21 +0300
- Subject: Re: [LIBGO PATCH] Fix compilation error against uClibc-ng: runtime_sysinfo.go: error: use of undefined type ‘___uclibc_locale_struct’
- Authentication-results: sourceware.org; auth=none
- References: <CAF5aO=+3VEXEs5RZ9sV=q9Ej6z5B62BaTG9Uvt2DQ4RC9shvgQ@mail.gmail.com> <CAKOQZ8xFdpEot7LQL6BBYpkjbwjj8uKOEUGwiZMeRNEDmWOyXQ@mail.gmail.com> <CAF5aO=Jh0VAS6JFe+wbjGNy8rymvCQGf9EEPG8LUUy3oOdM8=g@mail.gmail.com> <CAOyqgcXOpPxVD1vbmnykFHiPknq1qM=__rT=H24wo1UpUpujOA@mail.gmail.com>
On Fri, Sep 29, 2017 at 4:44 PM, Ian Lance Taylor <iant@golang.org> wrote:
>
> Thanks. Yes, the problem is that -fdump-go-spec is faithfully
> reporting a dangling type definition, which is fine in C but not in
> Go. Since we don't care about any of the locale stuff anyhow, I'm
> inclined to a patch like the appended. Can you see if this fixes the
> problem on your system? Thanks.
>
After I apply your patch, and additionally patch libgo/mkrsysinfo.sh in the
similar fashion, it does fix the problem:
--- a/libgo/mkrsysinfo.sh
+++ b/libgo/mkrsysinfo.sh
@@ -23,6 +23,7 @@
grep -v '^type _timespec_t ' | \
grep -v '^type _timespec ' | \
grep -v '^type _epoll_' | \
+ grep -v '^type _*locale[_ ]' | \
grep -v 'in6_addr' | \
grep -v 'sockaddr_in6' | \
sed -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1timeval\2/g' \
Thanks,
Alex