Message ID | 54A2FE1B.3010401@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Tue, Dec 30, 2014 at 11:33 AM, Lynn A. Boger <laboger@linux.vnet.ibm.com> wrote: > Hi, > > Please backport the change from > https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00713.html to gcc 4.9. > > 2014-12-30 Lynn Boger <laboger@linux.vnet.ibm.com> > > * libgo/mksysinfo.sh: Add the same compiler flags used by configure to > detect whether off64_t is present > when generating the go structures for C types. Otherwise the go type > for off64_t might not be > generated. The patch you attached is not a backport of the change to trunk. Ian
This one should not be backported. It was submitted but not added upstream. Sorry for the confusion. On 12/30/2014 01:33 PM, Lynn A. Boger wrote: > Hi, > > Please backport the change from > https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00713.html to gcc 4.9. > > 2014-12-30 Lynn Boger <laboger@linux.vnet.ibm.com> > > * libgo/mksysinfo.sh: Add the same compiler flags used by > configure to detect whether off64_t is present > when generating the go structures for C types. Otherwise the > go type for off64_t might not be > generated. > >
Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 218817) +++ libgo/mksysinfo.sh (working copy) @@ -204,8 +204,10 @@ enum { }; EOF -${CC} -fdump-go-spec=gen-sysinfo.go -std=gnu99 -S -o sysinfo.s sysinfo.c +${CC} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ + -fdump-go-spec=gen-sysinfo.go -std=gnu99 -S -o sysinfo.s sysinfo.c + echo 'package syscall' > ${OUT} echo 'import "unsafe"' >> ${OUT} echo 'type _ unsafe.Pointer' >> ${OUT}