This patch to libgo fixes the handling of the timex struct on ARM
GNU/Linux. This is PR go/52557: a boostrap failure on ARM.
Bootstrapped on x86_64-unknown-linux-gnu (I don't have an ARM GNU/Linux
system). Committed to mainline.
OK for 4.7 branch?
Ian
diff -r ca4aaf510222 libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh Fri Mar 09 00:20:49 2012 -0800
+++ b/libgo/mksysinfo.sh Tue Mar 13 13:52:59 2012 -0700
@@ -834,7 +834,15 @@
>> ${OUT}
# The timex struct.
-grep '^type _timex ' gen-sysinfo.go | \
+timex=`grep '^type _timex ' gen-sysinfo.go || true`
+if test "$timex" = ""; then
+ timex=`grep '^// type _timex ' gen-sysinfo.go || true`
+ if test "$timex" != ""; then
+timex=`echo $timex | sed -e 's|// ||' -e 's/INVALID-bit-field/int32/g'`
+ fi
+fi
+if test "$timex" != ""; then
+ echo "$timex" | \
sed -e 's/_timex/Timex/' \
-e 's/modes/Modes/' \
-e 's/offset/Offset/' \
@@ -858,6 +866,7 @@
-e 's/tai/Tai/' \
-e 's/_timeval/Timeval/' \
>> ${OUT}
+fi
# The rlimit struct.
grep '^type _rlimit ' gen-sysinfo.go | \