Always default to DWARF2 debugging for RX, even with -mas100-syntax

Message ID q6481s0-6471-7n9o-159p-n88o14p01r89@fhfr.qr
State New
Headers show
Series
  • Always default to DWARF2 debugging for RX, even with -mas100-syntax
Related show

Commit Message

Jakub Jelinek via Gcc-patches Sept. 10, 2021, 7:05 a.m.
The RX port defaults to STABS when -mas100-syntax is used because
the AS100 assembler does not support some of the pseudo-ops used
by DWARF2 debug emission.  Since STABS is going to be deprecated
that has to change.  The following simply always uses DWARF2,
likely leaving -mas100-syntax broken when debug info is generated.

Can the RX port maintainer please sort out the situation?  One
option might be to drop to NO_DEBUG when -mas100-syntax is
specified but maybe there's AS100 assemblers that now support
all the required pseudo ops or there's a way to define the DWARF
output macros to work around the lack of those (it's by no means
the first tagret to have such issues).

OK for trunk?

Thanks,
Richard.

2021-09-10  Richard Biener  <rguenther@suse.de>

	* config/rx/rx.h (PREFERRED_DEBUGGING_TYPE): Always define to
	DWARF2_DEBUG.
---
 gcc/config/rx/rx.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

-- 
2.31.1

Comments

Jakub Jelinek via Gcc-patches Sept. 10, 2021, 1:50 p.m. | #1
On 9/10/2021 1:05 AM, Richard Biener wrote:
> The RX port defaults to STABS when -mas100-syntax is used because

> the AS100 assembler does not support some of the pseudo-ops used

> by DWARF2 debug emission.  Since STABS is going to be deprecated

> that has to change.  The following simply always uses DWARF2,

> likely leaving -mas100-syntax broken when debug info is generated.

>

> Can the RX port maintainer please sort out the situation?  One

> option might be to drop to NO_DEBUG when -mas100-syntax is

> specified but maybe there's AS100 assemblers that now support

> all the required pseudo ops or there's a way to define the DWARF

> output macros to work around the lack of those (it's by no means

> the first tagret to have such issues).

>

> OK for trunk?

>

> Thanks,

> Richard.

>

> 2021-09-10  Richard Biener  <rguenther@suse.de>

>

> 	* config/rx/rx.h (PREFERRED_DEBUGGING_TYPE): Always define to

> 	DWARF2_DEBUG.

OK.  I think Nick was the rx maintainer, but if he doesn't chime in my 
recommendation would drop to NO_DEBUG when -mas100-syntax is enabled.  
I'm not immediately aware of any rx-elf users.  While my tester does 
test rx-elf, it's only with gas.

jeff

Patch

diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h
index 4078440fa31..3cb411db192 100644
--- a/gcc/config/rx/rx.h
+++ b/gcc/config/rx/rx.h
@@ -620,14 +620,8 @@  typedef unsigned int CUMULATIVE_ARGS;
 /* Like REG_P except that this macro is true for SET expressions.  */
 #define SET_P(rtl)    (GET_CODE (rtl) == SET)
 
-/* The AS100 assembler does not support .leb128 and .uleb128, but
-   the compiler-build-time configure tests will have enabled their
-   use because GAS supports them.  So default to generating STABS
-   debug information instead of DWARF2 when generating AS100
-   compatible output.  */
 #undef  PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE (TARGET_AS100_SYNTAX \
-				  ? DBX_DEBUG : DWARF2_DEBUG)
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #define DBX_DEBUGGING_INFO 1
 #define DWARF2_DEBUGGING_INFO 1