This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, libgo] Backport fix for compiler flags in mksysinfo.sh to gcc 4.9
- From: "Lynn A. Boger" <laboger at linux dot vnet dot ibm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>, Ian Taylor <iant at golang dot org>
- Date: Tue, 30 Dec 2014 13:33:47 -0600
- Subject: [PATCH, libgo] Backport fix for compiler flags in mksysinfo.sh to gcc 4.9
- Authentication-results: sourceware.org; auth=none
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}