diff mbox

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

Message ID 54A2FE1B.3010401@linux.vnet.ibm.com
State New
Headers show

Commit Message

Lynn A. Boger Dec. 30, 2014, 7:33 p.m. UTC
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.

Comments

Ian Lance Taylor Dec. 31, 2014, 6:50 p.m. UTC | #1
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
Lynn A. Boger Jan. 5, 2015, 7:18 p.m. UTC | #2
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.
>
>
diff mbox

Patch

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}