public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH,AIX] Manage .go_export section for AIX
@ 2017-07-26 10:09 REIX, Tony
  2017-07-28  0:16 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: REIX, Tony @ 2017-07-26 10:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ian Lance Taylor, dje.gcc

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

Description:
 * This patch manages the .go_export section as an EXCLUDE section on AIX.

Tests:
 * Fedora25/x86_64 + GCC trunk : Configure/Build: SUCCESS
   - build made by means of gmake.

ChangeLog:
 * go-backend.c (go_write_export_data): Use EXCLUDE section for AIX.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-8.0.0-go-backend-v2.patch --]
[-- Type: text/x-patch; name="gcc-8.0.0-go-backend-v2.patch", Size: 974 bytes --]

Index: gcc/go/ChangeLog
===================================================================
--- gcc/go/ChangeLog	(révision 250528)
+++ gcc/go/ChangeLog	(copie de travail)
@@ -1,3 +1,7 @@
+2017-07-26  Tony Reix  <tony.reix@atos.net>
+
+	* go-backend.c (go_write_export_data): Use EXCLUDE section for AIX.
+
 2017-06-09  Ian Lance Taylor  <iant@golang.org>
 
 	* go-lang.c (go_langhook_post_options): If -fsplit-stack is turned
Index: gcc/go/go-backend.c
===================================================================
--- gcc/go/go-backend.c	(révision 250528)
+++ gcc/go/go-backend.c	(copie de travail)
@@ -101,7 +101,11 @@ go_write_export_data (const char *bytes, unsigned
   if (sec == NULL)
     {
       gcc_assert (targetm_common.have_named_sections);
+#ifndef _AIX
       sec = get_section (GO_EXPORT_SECTION_NAME, SECTION_DEBUG, NULL);
+#else
+      sec = get_section (GO_EXPORT_SECTION_NAME, SECTION_EXCLUDE, NULL);
+#endif
     }
 
   switch_to_section (sec);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH,AIX] Manage .go_export section for AIX
  2017-07-26 10:09 [PATCH,AIX] Manage .go_export section for AIX REIX, Tony
@ 2017-07-28  0:16 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2017-07-28  0:16 UTC (permalink / raw)
  To: REIX, Tony; +Cc: gcc-patches, dje.gcc

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

On Wed, Jul 26, 2017 at 3:09 AM, REIX, Tony <tony.reix@atos.net> wrote:
> Description:
>  * This patch manages the .go_export section as an EXCLUDE section on AIX.
>
> Tests:
>  * Fedora25/x86_64 + GCC trunk : Configure/Build: SUCCESS
>    - build made by means of gmake.
>
> ChangeLog:
>  * go-backend.c (go_write_export_data): Use EXCLUDE section for AIX.

Thanks.  Testing _AIX here is clearly wrong, as we need to test for a
target property, not a host property.  I committed this patch as
appended.

Ian


2017-07-27    Tony Reix  <tony.reix@atos.net>

* go-backend.c (go_write_export_data): Use EXCLUDE section for
AIX.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 790 bytes --]

Index: go-backend.c
===================================================================
--- go-backend.c	(revision 250406)
+++ go-backend.c	(working copy)
@@ -45,6 +45,10 @@ along with GCC; see the file COPYING3.
 #define GO_EXPORT_SECTION_NAME ".go_export"
 #endif
 
+#ifndef TARGET_AIX
+#define TARGET_AIX 0
+#endif
+
 /* This file holds all the cases where the Go frontend needs
    information from gcc's backend.  */
 
@@ -101,7 +105,9 @@ go_write_export_data (const char *bytes,
   if (sec == NULL)
     {
       gcc_assert (targetm_common.have_named_sections);
-      sec = get_section (GO_EXPORT_SECTION_NAME, SECTION_DEBUG, NULL);
+      sec = get_section (GO_EXPORT_SECTION_NAME,
+			 TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
+			 NULL);
     }
 
   switch_to_section (sec);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-28  0:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 10:09 [PATCH,AIX] Manage .go_export section for AIX REIX, Tony
2017-07-28  0:16 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).