Patchwork Fix up mksysinfo.sh

login
register
mail settings
Submitter Jakub Jelinek
Date June 29, 2012, 6:34 p.m.
Message ID <20120629183427.GC20264@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/168246/
State New
Headers show

Comments

Jakub Jelinek - June 29, 2012, 6:34 p.m.
Hi!

The recent mksysinfo.sh change for glibc 2.16 bits/resource.h unfortunately
doesn't work, because the sed invocation two lines earlier removes the {}s
this sed command is looking for.
The following makes gcc 4.7 as well as trunk build in Fedora rawhide.


	Jakub
Ian Taylor - July 9, 2012, 11:15 a.m.
On Fri, Jun 29, 2012 at 11:34 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> The recent mksysinfo.sh change for glibc 2.16 bits/resource.h unfortunately
> doesn't work, because the sed invocation two lines earlier removes the {}s
> this sed command is looking for.
> The following makes gcc 4.7 as well as trunk build in Fedora rawhide.

Thanks.  Patch committed to trunk and 4.7 branch.

Ian

Patch

--- libgo/mksysinfo.sh	2012-06-29 14:23:30.684708901 +0200
+++ libgo/mksysinfo.sh	2012-06-29 14:23:20.782761973 +0200
@@ -522,10 +522,10 @@  grep '^const _DT_' gen-sysinfo.go |
 # The rusage struct.
 rusage=`grep '^type _rusage struct' gen-sysinfo.go`
 if test "$rusage" != ""; then
-  rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
-  rusage=`echo $rusage | sed -e 's/^ *//'`
   # Remove anonymous unions from GNU/Linux <bits/resource.h>.
   rusage=`echo $rusage | sed -e 's/Godump_[0-9]* struct {\([^}]*\)};/\1/g'`
+  rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
+  rusage=`echo $rusage | sed -e 's/^ *//'`
   nrusage=
   while test -n "$rusage"; do
     field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'`