On Fri, Sep 29, 2017 at 7:08 AM, Alex Potapenko <opotape...@gmail.com> wrote:
> On Fri, Sep 29, 2017 at 4:44 PM, Ian Lance Taylor <i...@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.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 253236)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-11b7dae7de94215e92eb46e703cfecd76c0a3282
+9a9d526a4c0a7f5b3635034b3e1dc3bbe6380dd2
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/mkrsysinfo.sh
===================================================================
--- libgo/mkrsysinfo.sh (revision 253025)
+++ libgo/mkrsysinfo.sh (working copy)
@@ -23,6 +23,7 @@ grep -v '^// ' gen-sysinfo.go | \
   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' \
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh  (revision 253025)
+++ libgo/mksysinfo.sh  (working copy)
@@ -34,6 +34,7 @@ grep -v '^// ' gen-sysinfo.go | \
   grep -v '^type _timespec ' | \
   grep -v '^type _timestruc_t ' | \
   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' \

Reply via email to