* [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
@ 2023-06-16 16:00 Paul E. Murphy
2023-06-16 16:00 ` [PATCH 2/2] rust: " Paul E. Murphy
2023-06-16 17:01 ` [PATCH 1/2] go: " Ian Lance Taylor
0 siblings, 2 replies; 10+ messages in thread
From: Paul E. Murphy @ 2023-06-16 16:00 UTC (permalink / raw)
To: gcc-patches
TARGET_AIX is defined to a non-zero value on linux and maybe other
powerpc64le targets. This leads to unexpected behavior such as
dropping the .go_export section when linking a shared library
on linux/powerpc64le.
Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
Fixes golang/go#60798.
gcc/go/ChangeLog:
* go-backend.cc [TARGET_AIX]: Rename and update usage to
TARGET_AIX_OS.
* go-lang.cc: Likewise.
---
gcc/go/go-backend.cc | 6 +++---
gcc/go/go-lang.cc | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/go/go-backend.cc b/gcc/go/go-backend.cc
index c6a1a2b7c18..6e2c919e829 100644
--- a/gcc/go/go-backend.cc
+++ b/gcc/go/go-backend.cc
@@ -45,8 +45,8 @@ along with GCC; see the file COPYING3. If not see
#define GO_EXPORT_SECTION_NAME ".go_export"
#endif
-#ifndef TARGET_AIX
-#define TARGET_AIX 0
+#ifndef TARGET_AIX_OS
+#define TARGET_AIX_OS 0
#endif
/* This file holds all the cases where the Go frontend needs
@@ -107,7 +107,7 @@ go_write_export_data (const char *bytes, unsigned int size)
{
gcc_assert (targetm_common.have_named_sections);
sec = get_section (GO_EXPORT_SECTION_NAME,
- TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
+ TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG,
NULL);
}
diff --git a/gcc/go/go-lang.cc b/gcc/go/go-lang.cc
index b6e8c37bf22..c6c147b20a5 100644
--- a/gcc/go/go-lang.cc
+++ b/gcc/go/go-lang.cc
@@ -39,8 +39,8 @@ along with GCC; see the file COPYING3. If not see
#include "go-c.h"
#include "go-gcc.h"
-#ifndef TARGET_AIX
-#define TARGET_AIX 0
+#ifndef TARGET_AIX_OS
+#define TARGET_AIX_OS 0
#endif
/* Language-dependent contents of a type. */
@@ -116,9 +116,9 @@ go_langhook_init (void)
args.compiling_runtime = go_compiling_runtime;
args.debug_escape_level = go_debug_escape_level;
args.debug_escape_hash = go_debug_escape_hash;
- args.nil_check_size_threshold = TARGET_AIX ? -1 : 4096;
+ args.nil_check_size_threshold = TARGET_AIX_OS ? -1 : 4096;
args.debug_optimization = go_debug_optimization;
- args.need_eqtype = TARGET_AIX ? true : false;
+ args.need_eqtype = TARGET_AIX_OS ? true : false;
args.linemap = go_get_linemap();
args.backend = go_get_backend();
go_create_gogo (&args);
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-16 16:00 [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS Paul E. Murphy
@ 2023-06-16 16:00 ` Paul E. Murphy
2023-06-19 8:39 ` Thomas Schwinge
2023-06-16 17:01 ` [PATCH 1/2] go: " Ian Lance Taylor
1 sibling, 1 reply; 10+ messages in thread
From: Paul E. Murphy @ 2023-06-16 16:00 UTC (permalink / raw)
To: gcc-patches
This was noticed when fixing the gccgo usage of the macro, the
rust usage is very similar.
TARGET_AIX is defined as a non-zero value on linux/powerpc64le
which may cause unexpected behavior. TARGET_AIX_OS should be
used to toggle AIX specific behavior.
gcc/rust/ChangeLog:
* rust-object-export.cc [TARGET_AIX]: Rename and update
usage to TARGET_AIX_OS.
---
gcc/rust/rust-object-export.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/rust/rust-object-export.cc b/gcc/rust/rust-object-export.cc
index 1143c767784..f9a395f6964 100644
--- a/gcc/rust/rust-object-export.cc
+++ b/gcc/rust/rust-object-export.cc
@@ -46,8 +46,8 @@
#define RUST_EXPORT_SECTION_NAME ".rust_export"
#endif
-#ifndef TARGET_AIX
-#define TARGET_AIX 0
+#ifndef TARGET_AIX_OS
+#define TARGET_AIX_OS 0
#endif
/* Return whether or not GCC has reported any errors. */
@@ -91,7 +91,7 @@ rust_write_export_data (const char *bytes, unsigned int size)
{
gcc_assert (targetm_common.have_named_sections);
sec = get_section (RUST_EXPORT_SECTION_NAME,
- TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
+ TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
}
switch_to_section (sec);
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-16 16:00 [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS Paul E. Murphy
2023-06-16 16:00 ` [PATCH 2/2] rust: " Paul E. Murphy
@ 2023-06-16 17:01 ` Ian Lance Taylor
2023-06-22 23:37 ` Peter Bergner
1 sibling, 1 reply; 10+ messages in thread
From: Ian Lance Taylor @ 2023-06-16 17:01 UTC (permalink / raw)
To: Paul E. Murphy; +Cc: gcc-patches
On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> TARGET_AIX is defined to a non-zero value on linux and maybe other
> powerpc64le targets. This leads to unexpected behavior such as
> dropping the .go_export section when linking a shared library
> on linux/powerpc64le.
>
> Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
>
> Fixes golang/go#60798.
>
> gcc/go/ChangeLog:
>
> * go-backend.cc [TARGET_AIX]: Rename and update usage to
> TARGET_AIX_OS.
> * go-lang.cc: Likewise.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-16 16:00 ` [PATCH 2/2] rust: " Paul E. Murphy
@ 2023-06-19 8:39 ` Thomas Schwinge
2023-06-21 16:20 ` Paul E Murphy
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Schwinge @ 2023-06-19 8:39 UTC (permalink / raw)
To: Paul E. Murphy; +Cc: gcc-patches, gcc-rust
Hi Paul!
On 2023-06-16T11:00:02-0500, "Paul E. Murphy via Gcc-patches" <gcc-patches@gcc.gnu.org> wrote:
> This was noticed when fixing the gccgo usage of the macro, the
> rust usage is very similar.
>
> TARGET_AIX is defined as a non-zero value on linux/powerpc64le
> which may cause unexpected behavior. TARGET_AIX_OS should be
> used to toggle AIX specific behavior.
>
> gcc/rust/ChangeLog:
>
> * rust-object-export.cc [TARGET_AIX]: Rename and update
> usage to TARGET_AIX_OS.
I don't have rights to formally approve this GCC/Rust change, but I'll
note that it follows "as obvious" (see
<https://gcc.gnu.org/gitwrite.html#policies>, "Obvious fixes") to the
corresponding GCC/Go change, which has been approved:
<https://inbox.sourceware.org/CAKOQZ8wDWc7G5_jBNK1jvgChhiURceeAmZb5Bqrx_VZjeJP2Vw@mail.gmail.com>,
and which is where this GCC/Rust code has been copied from, so I suggest
you push both patches at once.
Grüße
Thomas
> ---
> gcc/rust/rust-object-export.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/rust/rust-object-export.cc b/gcc/rust/rust-object-export.cc
> index 1143c767784..f9a395f6964 100644
> --- a/gcc/rust/rust-object-export.cc
> +++ b/gcc/rust/rust-object-export.cc
> @@ -46,8 +46,8 @@
> #define RUST_EXPORT_SECTION_NAME ".rust_export"
> #endif
>
> -#ifndef TARGET_AIX
> -#define TARGET_AIX 0
> +#ifndef TARGET_AIX_OS
> +#define TARGET_AIX_OS 0
> #endif
>
> /* Return whether or not GCC has reported any errors. */
> @@ -91,7 +91,7 @@ rust_write_export_data (const char *bytes, unsigned int size)
> {
> gcc_assert (targetm_common.have_named_sections);
> sec = get_section (RUST_EXPORT_SECTION_NAME,
> - TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
> + TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
> }
>
> switch_to_section (sec);
> --
> 2.31.1
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-19 8:39 ` Thomas Schwinge
@ 2023-06-21 16:20 ` Paul E Murphy
2023-06-22 23:38 ` Peter Bergner
0 siblings, 1 reply; 10+ messages in thread
From: Paul E Murphy @ 2023-06-21 16:20 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: gcc-patches, gcc-rust
On 6/19/23 3:39 AM, Thomas Schwinge wrote:
> Hi Paul!
>
> On 2023-06-16T11:00:02-0500, "Paul E. Murphy via Gcc-patches" <gcc-patches@gcc.gnu.org> wrote:
>> This was noticed when fixing the gccgo usage of the macro, the
>> rust usage is very similar.
>>
>> TARGET_AIX is defined as a non-zero value on linux/powerpc64le
>> which may cause unexpected behavior. TARGET_AIX_OS should be
>> used to toggle AIX specific behavior.
>>
>> gcc/rust/ChangeLog:
>>
>> * rust-object-export.cc [TARGET_AIX]: Rename and update
>> usage to TARGET_AIX_OS.
>
> I don't have rights to formally approve this GCC/Rust change, but I'll
> note that it follows "as obvious" (see
> <https://gcc.gnu.org/gitwrite.html#policies>, "Obvious fixes") to the
> corresponding GCC/Go change, which has been approved:
> <https://inbox.sourceware.org/CAKOQZ8wDWc7G5_jBNK1jvgChhiURceeAmZb5Bqrx_VZjeJP2Vw@mail.gmail.com>,
> and which is where this GCC/Rust code has been copied from, so I suggest
> you push both patches at once.
>
>
> Grüße
> Thomas
Hi Thomas,
Thank you for reviewing. I do not have commit access, so I cannot push
this myself. If this is OK, could one of the rust maintainers push this
patch?
Thanks,
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-16 17:01 ` [PATCH 1/2] go: " Ian Lance Taylor
@ 2023-06-22 23:37 ` Peter Bergner
2023-06-22 23:46 ` Peter Bergner
0 siblings, 1 reply; 10+ messages in thread
From: Peter Bergner @ 2023-06-22 23:37 UTC (permalink / raw)
To: Ian Lance Taylor, Paul E. Murphy; +Cc: gcc-patches
On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote:
> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>> TARGET_AIX is defined to a non-zero value on linux and maybe other
>> powerpc64le targets. This leads to unexpected behavior such as
>> dropping the .go_export section when linking a shared library
>> on linux/powerpc64le.
>>
>> Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
>>
>> Fixes golang/go#60798.
>>
>> gcc/go/ChangeLog:
>>
>> * go-backend.cc [TARGET_AIX]: Rename and update usage to
>> TARGET_AIX_OS.
>> * go-lang.cc: Likewise.
>
> This is OK.
>
> Thanks.
>
> Ian
I pushed this to trunk for Paul.
Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-21 16:20 ` Paul E Murphy
@ 2023-06-22 23:38 ` Peter Bergner
0 siblings, 0 replies; 10+ messages in thread
From: Peter Bergner @ 2023-06-22 23:38 UTC (permalink / raw)
To: Paul E Murphy, Thomas Schwinge; +Cc: gcc-patches, gcc-rust
On 6/21/23 11:20 AM, Paul E Murphy via Gcc-patches wrote:
>
>
> On 6/19/23 3:39 AM, Thomas Schwinge wrote:
>> Hi Paul!
>>
>> On 2023-06-16T11:00:02-0500, "Paul E. Murphy via Gcc-patches" <gcc-patches@gcc.gnu.org> wrote:
>>> This was noticed when fixing the gccgo usage of the macro, the
>>> rust usage is very similar.
>>>
>>> TARGET_AIX is defined as a non-zero value on linux/powerpc64le
>>> which may cause unexpected behavior. TARGET_AIX_OS should be
>>> used to toggle AIX specific behavior.
>>>
>>> gcc/rust/ChangeLog:
>>>
>>> * rust-object-export.cc [TARGET_AIX]: Rename and update
>>> usage to TARGET_AIX_OS.
>>
>> I don't have rights to formally approve this GCC/Rust change, but I'll
>> note that it follows "as obvious" (see
>> <https://gcc.gnu.org/gitwrite.html#policies>, "Obvious fixes") to the
>> corresponding GCC/Go change, which has been approved:
>> <https://inbox.sourceware.org/CAKOQZ8wDWc7G5_jBNK1jvgChhiURceeAmZb5Bqrx_VZjeJP2Vw@mail.gmail.com>,
>> and which is where this GCC/Rust code has been copied from, so I suggest
>> you push both patches at once.
>>
>>
>> Grüße
>> Thomas
>
> Hi Thomas,
>
> Thank you for reviewing. I do not have commit access, so I cannot push this myself. If this is OK, could one of the rust maintainers push this patch?
>
> Thanks,
> Paul
I pushed this to trunk for Paul.
Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-22 23:37 ` Peter Bergner
@ 2023-06-22 23:46 ` Peter Bergner
2023-06-23 3:30 ` Ian Lance Taylor
0 siblings, 1 reply; 10+ messages in thread
From: Peter Bergner @ 2023-06-22 23:46 UTC (permalink / raw)
To: Ian Lance Taylor, Paul E. Murphy; +Cc: gcc-patches
On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote:
> On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote:
>> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches
>> <gcc-patches@gcc.gnu.org> wrote:
>>>
>>> TARGET_AIX is defined to a non-zero value on linux and maybe other
>>> powerpc64le targets. This leads to unexpected behavior such as
>>> dropping the .go_export section when linking a shared library
>>> on linux/powerpc64le.
>>>
>>> Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
>>>
>>> Fixes golang/go#60798.
>>>
>>> gcc/go/ChangeLog:
>>>
>>> * go-backend.cc [TARGET_AIX]: Rename and update usage to
>>> TARGET_AIX_OS.
>>> * go-lang.cc: Likewise.
>>
>> This is OK.
>>
>> Thanks.
>>
>> Ian
>
> I pushed this to trunk for Paul.
I see this is broken on the release branches too. Are backports ok
after some burn-in on trunk?
Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-22 23:46 ` Peter Bergner
@ 2023-06-23 3:30 ` Ian Lance Taylor
2023-06-30 17:28 ` Peter Bergner
0 siblings, 1 reply; 10+ messages in thread
From: Ian Lance Taylor @ 2023-06-23 3:30 UTC (permalink / raw)
To: Peter Bergner; +Cc: Paul E. Murphy, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
On Thu, Jun 22, 2023, 4:47 PM Peter Bergner <bergner@linux.ibm.com> wrote:
> On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote:
> > On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote:
> >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches
> >> <gcc-patches@gcc.gnu.org> wrote:
> >>>
> >>> TARGET_AIX is defined to a non-zero value on linux and maybe other
> >>> powerpc64le targets. This leads to unexpected behavior such as
> >>> dropping the .go_export section when linking a shared library
> >>> on linux/powerpc64le.
> >>>
> >>> Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
> >>>
> >>> Fixes golang/go#60798.
> >>>
> >>> gcc/go/ChangeLog:
> >>>
> >>> * go-backend.cc [TARGET_AIX]: Rename and update usage to
> >>> TARGET_AIX_OS.
> >>> * go-lang.cc: Likewise.
> >>
> >> This is OK.
> >>
> >> Thanks.
> >>
> >> Ian
> >
> > I pushed this to trunk for Paul.
>
> I see this is broken on the release branches too. Are backports ok
> after some burn-in on trunk?
>
Yes. Thanks.
Ian
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
2023-06-23 3:30 ` Ian Lance Taylor
@ 2023-06-30 17:28 ` Peter Bergner
0 siblings, 0 replies; 10+ messages in thread
From: Peter Bergner @ 2023-06-30 17:28 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Paul E. Murphy, gcc-patches
On 6/22/23 10:30 PM, Ian Lance Taylor wrote:
> On Thu, Jun 22, 2023, 4: 47 PM Peter Bergner <bergner@ linux. ibm. com> wrote: On 6/22/23 6: 37 PM, Peter Bergner via Gcc-patches wrote: > On 6/16/23
> >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches
> >> <gcc-patches@gcc.gnu.org <mailto:gcc-patches@gcc.gnu.org>> wrote:
> >>>
> >>> TARGET_AIX is defined to a non-zero value on linux and maybe other
> >>> powerpc64le targets. This leads to unexpected behavior such as
> >>> dropping the .go_export section when linking a shared library
> >>> on linux/powerpc64le.
> >>>
> >>> Instead, use TARGET_AIX_OS to toggle AIX specific behavior.
> >>>
> >>> Fixes golang/go#60798.
> >>>
> >>> gcc/go/ChangeLog:
> >>>
> >>> * go-backend.cc [TARGET_AIX]: Rename and update usage to
> >>> TARGET_AIX_OS.
> >>> * go-lang.cc: Likewise.
> >>
> >> This is OK.
> >>
> >> Thanks.
> >>
> >> Ian
> >
> > I pushed this to trunk for Paul.
>
> I see this is broken on the release branches too. Are backports ok
> after some burn-in on trunk?
>
> Yes. Thanks.
Ok, I backported the Go fix to GCC 13, 12, 11 and 10 (before the 10.5 freeze).
I also backported to the rust change to GCC 13, which was the first release
with rust. Thanks.
Peter
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-06-30 17:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 16:00 [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS Paul E. Murphy
2023-06-16 16:00 ` [PATCH 2/2] rust: " Paul E. Murphy
2023-06-19 8:39 ` Thomas Schwinge
2023-06-21 16:20 ` Paul E Murphy
2023-06-22 23:38 ` Peter Bergner
2023-06-16 17:01 ` [PATCH 1/2] go: " Ian Lance Taylor
2023-06-22 23:37 ` Peter Bergner
2023-06-22 23:46 ` Peter Bergner
2023-06-23 3:30 ` Ian Lance Taylor
2023-06-30 17:28 ` Peter Bergner
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).