diff mbox series

[AIX] Fix issue with PRI*64 on AIX.

Message ID B37989F2852398498001550C29155BE5178DFFC8@FRCRPVV9EX3MSX.ww931.my-it-solutions.net
State New
Headers show
Series [AIX] Fix issue with PRI*64 on AIX. | expand

Commit Message

REIX, Tony Oct. 10, 2017, 9:09 a.m. UTC
Description:
 * This patch enables to build on AIX.

Tests:
 * AIX: Build: SUCCESS
   - build made by means of gmake within GCC 8 trunk.

ChangeLog:
  * go-system.h : Enable to build on AIX.
  (fix issue with PRIx64 and PRIu64)

Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader

Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net

Comments

David Edelsohn Oct. 10, 2017, 1:46 p.m. UTC | #1
On Tue, Oct 10, 2017 at 5:09 AM, REIX, Tony <tony.reix@atos.net> wrote:
> Description:
>  * This patch enables to build on AIX.
>
> Tests:
>  * AIX: Build: SUCCESS
>    - build made by means of gmake within GCC 8 trunk.
>
> ChangeLog:
>   * go-system.h : Enable to build on AIX.
>   (fix issue with PRIx64 and PRIu64)

Tony,

This is the wrong forum to propose the patch.  The Go frontend is
imported from Golang upstream.  The patch must be proposed in
PolyGerrit, merged into the main repository, and then imported to GCC
Gofrontend.

Thanks, David
REIX, Tony Oct. 10, 2017, 2:31 p.m. UTC | #2
Hi David,

Since the file ./gcc/go/go-system.h in GCC source code starts by:

// go-system.h -- Go frontend inclusion of gcc header files   -*- C++ -*-
// Copyright (C) 2009-2017 Free Software Foundation, Inc.

// This file is part of GCC.
...

I think it is SFS and not Google.

Moreover, this file does not appear in my Google Git environment I use for PolyGerrit (GCCGo/GITgofrontend/gofrontend directory on my PC).

Unless I do not understand something...

Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net
David Edelsohn Oct. 10, 2017, 2:45 p.m. UTC | #3
On Tue, Oct 10, 2017 at 10:31 AM, REIX, Tony <tony.reix@atos.net> wrote:
> Hi David,
>
> Since the file ./gcc/go/go-system.h in GCC source code starts by:
>
> // go-system.h -- Go frontend inclusion of gcc header files   -*- C++ -*-
> // Copyright (C) 2009-2017 Free Software Foundation, Inc.
>
> // This file is part of GCC.
> ...
>
> I think it is SFS and not Google.
>
> Moreover, this file does not appear in my Google Git environment I use for PolyGerrit (GCCGo/GITgofrontend/gofrontend directory on my PC).

I guess that it is part of GCC.  I was confused by the README.gcc file
in that directory, but refers to the gofrontend subdirectory.

It still is in Ian's court.

Thanks, David
Ian Lance Taylor Oct. 11, 2017, 10:54 p.m. UTC | #4
On Tue, Oct 10, 2017 at 2:09 AM, REIX, Tony <tony.reix@atos.net> wrote:
> Description:
>  * This patch enables to build on AIX.
>
> Tests:
>  * AIX: Build: SUCCESS
>    - build made by means of gmake within GCC 8 trunk.
>
> ChangeLog:
>   * go-system.h : Enable to build on AIX.
>   (fix issue with PRIx64 and PRIu64)

Thanks.  Committed with this ChangeLog entry.

2017-10-11  Tony Reix  <tony.reix@atos.net>

    * go-system.h (__STDC_FORMAT_MACROS): Define before including any
    system header files, as is done in ../system.h.

Ian
diff mbox series

Patch

--- ./gcc/go/go-system.h.ORIGIN	2017-10-06 09:36:56 -0500
+++ ./gcc/go/go-system.h	2017-10-06 15:51:26 -0500
@@ -22,6 +22,12 @@ 
 
 #include "config.h"
 
+// Define this so that inttypes.h defines the PRI?64 macros even
+// when compiling with a C++ compiler. Define it here so in the
+// event inttypes.h gets pulled in by another header it is already
+// defined.
+#define __STDC_FORMAT_MACROS
+
 // These must be included before the #poison declarations in system.h.
 
 #include <algorithm>
--- ./gcc/go/ChangeLog.ORIGIN	2017-10-10 10:59:01 -0500
+++ ./gcc/go/ChangeLog	2017-10-10 10:59:16 -0500
@@ -1,3 +1,8 @@ 
+2017-10-09  Tony Reix  <tony.reix@atos.net>
+
+        * go-system.h : Enable to build on AIX.
+        (fix issue with PRIx64 and PRIu64)
+
 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>