public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix redefined macro for epiphany.
@ 2022-01-12  9:47 Martin Liška
  2022-01-12 10:03 ` Richard Biener
  2022-01-12 14:22 ` Jeff Law
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Liška @ 2022-01-12  9:47 UTC (permalink / raw)
  To: gcc-patches

The following warning is emitted gazillion times.

Fixes:

In file included from ./tm.h:23,
                  from gcc/genconfig.c:25:
gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
   209 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section\t.rodata"
       |
In file included from ./tm.h:21,
                  from gcc/genconfig.c:25:
gcc/config/epiphany/epiphany.h:671: note: this is the location of the previous definition
   671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* config/elfos.h (READONLY_DATA_SECTION_ASM_OP): Define only if
	not defined.
---
  gcc/config/elfos.h | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 2e0c709e585..add949ec940 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -206,7 +206,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  #define ASCII_DATA_ASM_OP	"\t.ascii\t"
  
  /* Support a read-only data section.  */
+#ifndef READONLY_DATA_SECTION_ASM_OP
  #define READONLY_DATA_SECTION_ASM_OP	"\t.section\t.rodata"
+#endif
  
  /* On svr4, we *do* have support for the .init and .fini sections, and we
     can put stuff in there to be executed before and after `main'.  We let
-- 
2.34.1


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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12  9:47 [PATCH] Fix redefined macro for epiphany Martin Liška
@ 2022-01-12 10:03 ` Richard Biener
  2022-01-12 10:10   ` Martin Liška
  2022-01-12 14:22 ` Jeff Law
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Biener @ 2022-01-12 10:03 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Wed, Jan 12, 2022 at 10:47 AM Martin Liška <mliska@suse.cz> wrote:
>
> The following warning is emitted gazillion times.
>
> Fixes:
>
> In file included from ./tm.h:23,
>                   from gcc/genconfig.c:25:
> gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
>    209 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section\t.rodata"
>        |
> In file included from ./tm.h:21,
>                   from gcc/genconfig.c:25:
> gcc/config/epiphany/epiphany.h:671: note: this is the location of the previous definition
>    671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"
>
> Ready to be installed?

Most other targets #undef READONLY_DATA_SECION_ASM_OP before defining,
isn't the issue that the target doesn't do that and that it has
uncommon order of
tm_file in config.gcc?  (${tm_file} first, before elfos.h)

Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         * config/elfos.h (READONLY_DATA_SECTION_ASM_OP): Define only if
>         not defined.
> ---
>   gcc/config/elfos.h | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
> index 2e0c709e585..add949ec940 100644
> --- a/gcc/config/elfos.h
> +++ b/gcc/config/elfos.h
> @@ -206,7 +206,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>   #define ASCII_DATA_ASM_OP     "\t.ascii\t"
>
>   /* Support a read-only data section.  */
> +#ifndef READONLY_DATA_SECTION_ASM_OP
>   #define READONLY_DATA_SECTION_ASM_OP  "\t.section\t.rodata"
> +#endif
>
>   /* On svr4, we *do* have support for the .init and .fini sections, and we
>      can put stuff in there to be executed before and after `main'.  We let
> --
> 2.34.1
>

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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12 10:03 ` Richard Biener
@ 2022-01-12 10:10   ` Martin Liška
  2022-01-12 10:35     ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Liška @ 2022-01-12 10:10 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, gnu

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

On 1/12/22 11:03, Richard Biener wrote:
> tm_file in config.gcc?  (${tm_file} first, before elfos.h)

Heh, yes, that's the case. The following patch fixes that.

May I install it?
Cheers,
Martin

[-- Attachment #2: 0001-Include-elfos.h-before-tm_file.patch --]
[-- Type: text/x-patch, Size: 1202 bytes --]

From 14fa27ba17cf9aa1a971ae93f8a5ef6aa857c67e Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 12 Jan 2022 11:09:20 +0100
Subject: [PATCH] Include elfos.h before ${tm_file}.

Fixes:

In file included from ./tm.h:23,
                  from gcc/genconfig.c:25:
gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
   209 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section\t.rodata"
       |
In file included from ./tm.h:21,
                  from gcc/genconfig.c:25:
gcc/config/epiphany/epiphany.h:671: note: this is the location of the previous definition
   671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"

gcc/ChangeLog:

	* config.gcc: Include elfos.h before ${tm_file}.
---
 gcc/config.gcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 89e0992fda5..f1b8d832c6f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1620,7 +1620,7 @@ csky-*-*)
 	esac
 	;;
 epiphany-*-elf | epiphany-*-rtems*)
-	tm_file="${tm_file} dbxelf.h elfos.h"
+	tm_file="dbxelf.h elfos.h ${tm_file}"
 	tmake_file="${tmake_file} epiphany/t-epiphany"
 	case ${target} in
 	epiphany-*-rtems*)
-- 
2.34.1


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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12 10:10   ` Martin Liška
@ 2022-01-12 10:35     ` Richard Biener
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Biener @ 2022-01-12 10:35 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches, Joern Wolfgang Rennecke

On Wed, Jan 12, 2022 at 11:10 AM Martin Liška <mliska@suse.cz> wrote:
>
> On 1/12/22 11:03, Richard Biener wrote:
> > tm_file in config.gcc?  (${tm_file} first, before elfos.h)
>
> Heh, yes, that's the case. The following patch fixes that.

OK if the target builds with that.

> May I install it?
> Cheers,
> Martin

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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12  9:47 [PATCH] Fix redefined macro for epiphany Martin Liška
  2022-01-12 10:03 ` Richard Biener
@ 2022-01-12 14:22 ` Jeff Law
  2022-01-12 14:56   ` Richard Biener
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Law @ 2022-01-12 14:22 UTC (permalink / raw)
  To: Martin Liška, gcc-patches



On 1/12/2022 2:47 AM, Martin Liška wrote:
> The following warning is emitted gazillion times.
>
> Fixes:
>
> In file included from ./tm.h:23,
>                  from gcc/genconfig.c:25:
> gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
>   209 | #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
>       |
> In file included from ./tm.h:21,
>                  from gcc/genconfig.c:25:
> gcc/config/epiphany/epiphany.h:671: note: this is the location of the 
> previous definition
>   671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>     * config/elfos.h (READONLY_DATA_SECTION_ASM_OP): Define only if
>     not defined.
Please do.

However, I think we should deprecate the epiphany.  It's been broken for 
~2 years randomly failing in reload.  I tried to fix it once and quickly 
gave up.  It currently ignores all testing failures in my tester as it's 
been horribly unstable.

jeff

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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12 14:22 ` Jeff Law
@ 2022-01-12 14:56   ` Richard Biener
  2022-01-12 15:58     ` Jeff Law
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2022-01-12 14:56 UTC (permalink / raw)
  To: Jeff Law, Joern Wolfgang Rennecke; +Cc: Martin Liška, GCC Patches

On Wed, Jan 12, 2022 at 3:23 PM Jeff Law via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
>
> On 1/12/2022 2:47 AM, Martin Liška wrote:
> > The following warning is emitted gazillion times.
> >
> > Fixes:
> >
> > In file included from ./tm.h:23,
> >                  from gcc/genconfig.c:25:
> > gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
> >   209 | #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
> >       |
> > In file included from ./tm.h:21,
> >                  from gcc/genconfig.c:25:
> > gcc/config/epiphany/epiphany.h:671: note: this is the location of the
> > previous definition
> >   671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"
> >
> > Ready to be installed?
> > Thanks,
> > Martin
> >
> > gcc/ChangeLog:
> >
> >     * config/elfos.h (READONLY_DATA_SECTION_ASM_OP): Define only if
> >     not defined.
> Please do.
>
> However, I think we should deprecate the epiphany.  It's been broken for
> ~2 years randomly failing in reload.  I tried to fix it once and quickly
> gave up.  It currently ignores all testing failures in my tester as it's
> been horribly unstable.

Joern is still listed as maintainer so let's CC him before doing
anything.  That said,
if it builds it's good enough for GCC 12 - we can discuss any target
deprecations
during stage1 (or deprecate those that don't even build right now,
though I'm not
aware of any).

Richard.

>
> jeff

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

* Re: [PATCH] Fix redefined macro for epiphany.
  2022-01-12 14:56   ` Richard Biener
@ 2022-01-12 15:58     ` Jeff Law
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Law @ 2022-01-12 15:58 UTC (permalink / raw)
  To: Richard Biener, Joern Wolfgang Rennecke; +Cc: Martin Liška, GCC Patches



On 1/12/2022 7:56 AM, Richard Biener wrote:
> On Wed, Jan 12, 2022 at 3:23 PM Jeff Law via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>>
>> On 1/12/2022 2:47 AM, Martin Liška wrote:
>>> The following warning is emitted gazillion times.
>>>
>>> Fixes:
>>>
>>> In file included from ./tm.h:23,
>>>                   from gcc/genconfig.c:25:
>>> gcc/config/elfos.h:209: warning: "READONLY_DATA_SECTION_ASM_OP" redefined
>>>    209 | #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
>>>        |
>>> In file included from ./tm.h:21,
>>>                   from gcc/genconfig.c:25:
>>> gcc/config/epiphany/epiphany.h:671: note: this is the location of the
>>> previous definition
>>>    671 | #define READONLY_DATA_SECTION_ASM_OP    "\t.section .rodata"
>>>
>>> Ready to be installed?
>>> Thanks,
>>> Martin
>>>
>>> gcc/ChangeLog:
>>>
>>>      * config/elfos.h (READONLY_DATA_SECTION_ASM_OP): Define only if
>>>      not defined.
>> Please do.
>>
>> However, I think we should deprecate the epiphany.  It's been broken for
>> ~2 years randomly failing in reload.  I tried to fix it once and quickly
>> gave up.  It currently ignores all testing failures in my tester as it's
>> been horribly unstable.
> Joern is still listed as maintainer so let's CC him before doing
> anything.  That said,
> if it builds it's good enough for GCC 12 - we can discuss any target
> deprecations
> during stage1 (or deprecate those that don't even build right now,
> though I'm not
> aware of any).
cr16 still uses cc0.  It's marked as deprecated in gcc-12 and assuming 
it doesn't get fixed, removal in gcc-13.

m32c should be deprecated.  While it'll build libgcc, it'll fault (due 
to register allocation/reloading issues) building newlib or anything 
relatively complex.  This has been the case for at least 2 years.

epiphany will build newlib consistently, so I guess keeping it another 
release is OK to see if Joern wants to step up and fix its reload issues.






Jeff


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

end of thread, other threads:[~2022-01-12 15:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  9:47 [PATCH] Fix redefined macro for epiphany Martin Liška
2022-01-12 10:03 ` Richard Biener
2022-01-12 10:10   ` Martin Liška
2022-01-12 10:35     ` Richard Biener
2022-01-12 14:22 ` Jeff Law
2022-01-12 14:56   ` Richard Biener
2022-01-12 15:58     ` Jeff Law

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).