This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, libgo] Backport fix for compiler flags in mksysinfo.sh to gcc 4.9


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}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]