Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-11-10 Thread Martin Liška

On 11/10/22 15:12, Michael Matz wrote:

Hello,

On Thu, 10 Nov 2022, Martin Liška wrote:


These changes are part of
commit r13-2361-g7e0db0cdf01e9c885a29cb37415f5bc00d90c029
"STABS: remove -gstabs and -gxcoff functionality".  What this does is
remove these identifiers from "poisoning":

  /* As the last action in this file, we poison the identifiers that
 shouldn't be used.
  [...]
  /* Other obsolete target macros, or macros that used to be in target
 headers and were not used, and may be obsolete or may never have
 been used.  */
   #pragma GCC poison [...]

Shouldn't these identifiers actually stay (so that any accidental future
use gets flagged, as I understand this machinery), and instead more
identifiers be added potentially: those where their definition/use got
removed with "STABS: remove -gstabs and -gxcoff functionality"?  (I've
not checked.)


Well, the identifiers are not used any longer, so I don't think we should
poison them. Or do I miss something?


It's the very nature of poisoned identifiers that they aren't used (every
use would get flagged as error).  The point of poisoning them is to avoid
future new uses to creep in (e.g. via mislead back- or forward-ports,
which can for instance happen easily with backend macros when an
out-of-tree port is eventually tried to be integrated).  Hence, generally
the list of those identifiers is only extended, never reduced.  (There may
be exceptions of course)


Ahh, ok, makes sense. So Thomas, please put them back to the poisoned list.

Martin




Ciao,
Michael.




Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-11-10 Thread Michael Matz via Gcc-patches
Hello,

On Thu, 10 Nov 2022, Martin Liška wrote:

> > These changes are part of
> > commit r13-2361-g7e0db0cdf01e9c885a29cb37415f5bc00d90c029
> > "STABS: remove -gstabs and -gxcoff functionality".  What this does is
> > remove these identifiers from "poisoning":
> > 
> >  /* As the last action in this file, we poison the identifiers that
> > shouldn't be used.
> >  [...]
> >  /* Other obsolete target macros, or macros that used to be in target
> > headers and were not used, and may be obsolete or may never have
> > been used.  */
> >   #pragma GCC poison [...]
> > 
> > Shouldn't these identifiers actually stay (so that any accidental future
> > use gets flagged, as I understand this machinery), and instead more
> > identifiers be added potentially: those where their definition/use got
> > removed with "STABS: remove -gstabs and -gxcoff functionality"?  (I've
> > not checked.)
> 
> Well, the identifiers are not used any longer, so I don't think we should
> poison them. Or do I miss something?

It's the very nature of poisoned identifiers that they aren't used (every 
use would get flagged as error).  The point of poisoning them is to avoid 
future new uses to creep in (e.g. via mislead back- or forward-ports, 
which can for instance happen easily with backend macros when an 
out-of-tree port is eventually tried to be integrated).  Hence, generally 
the list of those identifiers is only extended, never reduced.  (There may 
be exceptions of course)


Ciao,
Michael.


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-11-10 Thread Martin Liška

On 11/4/22 10:32, Thomas Schwinge wrote:

Hi!

On 2022-09-01T12:05:23+0200, Martin Liška  wrote:

gcc/ChangeLog:



--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1009,8 +1009,7 @@ extern void fancy_abort (const char *, int, const char *)
   ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL HOST_WORDS_BIG_ENDIAN\
   OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA ROUND_TYPE_SIZE\
   ROUND_TYPE_SIZE_UNIT CONST_SECTION_ASM_OP CRT_GET_RFIB_TEXT\
- DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
- DBX_WORKING_DIRECTORY INSN_CACHE_DEPTH INSN_CACHE_SIZE \
+ INSN_CACHE_DEPTH INSN_CACHE_SIZE   \
   INSN_CACHE_LINE_WIDTH INIT_SECTION_PREAMBLE NEED_ATEXIT ON_EXIT\
   EXIT_BODY OBJECT_FORMAT_ROSE MULTIBYTE_CHARS MAP_CHARACTER \
   LIBGCC_NEEDS_DOUBLE FINAL_PRESCAN_LABEL DEFAULT_CALLER_SAVES   \
@@ -1023,15 +1022,14 @@ extern void fancy_abort (const char *, int, const char 
*)
   MAX_WCHAR_TYPE_SIZE SHARED_SECTION_ASM_OP INTEGRATE_THRESHOLD  \
   FINAL_REG_PARM_STACK_SPACE MAYBE_REG_PARM_STACK_SPACE  \
   TRADITIONAL_PIPELINE_INTERFACE DFA_PIPELINE_INTERFACE  \
- DBX_OUTPUT_STANDARD_TYPES BUILTIN_SETJMP_FRAME_VALUE   \
+ BUILTIN_SETJMP_FRAME_VALUE \
   SUNOS4_SHARED_LIBRARIES PROMOTE_FOR_CALL_ONLY  \
   SPACE_AFTER_L_OPTION NO_RECURSIVE_FUNCTION_CSE \
   DEFAULT_MAIN_RETURN TARGET_MEM_FUNCTIONS EXPAND_BUILTIN_VA_ARG \
   COLLECT_PARSE_FLAG DWARF2_GENERATE_TEXT_SECTION_LABEL WINNING_GDB  \
   ASM_OUTPUT_FILENAME ASM_OUTPUT_SOURCE_LINE FILE_NAME_JOINER\
- GDB_INV_REF_REGPARM_STABS_LETTER DBX_MEMPARM_STABS_LETTER  \
- PUT_SDB_SRC_FILE STABS_GCC_MARKER DBX_OUTPUT_FUNCTION_END  \
- DBX_OUTPUT_GCC_MARKER DBX_FINISH_SYMBOL SDB_GENERATE_FAKE  \
+ GDB_INV_REF_REGPARM_STABS_LETTER   \
+ PUT_SDB_SRC_FILE STABS_GCC_MARKER SDB_GENERATE_FAKE\
   NON_SAVING_SETJMP TARGET_LATE_RTL_PROLOGUE_EPILOGUE\
   CASE_DROPS_THROUGH TARGET_BELL TARGET_BS TARGET_CR TARGET_DIGIT0   \
  TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT\
@@ -1056,8 +1054,8 @@ extern void fancy_abort (const char *, int, const char *)
   PREFERRED_OUTPUT_RELOAD_CLASS SYSTEM_INCLUDE_DIR   \
   STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT\
   LINK_ELIMINATE_DUPLICATE_LDIRECTORIES MIPS_DEBUGGING_INFO  \
- IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES DBX_OUTPUT_LBRAC\
- DBX_OUTPUT_NFUN DBX_OUTPUT_RBRAC RANGE_TEST_NON_SHORT_CIRCUIT  \
+ IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES \
+ RANGE_TEST_NON_SHORT_CIRCUIT   \
   REAL_VALUE_TRUNCATE REVERSE_CONDEXEC_PREDICATES_P  \
   TARGET_ALIGN_ANON_BITFIELDS TARGET_NARROW_VOLATILE_BITFIELDS   \
   IDENT_ASM_OP UNALIGNED_SHORT_ASM_OP UNALIGNED_INT_ASM_OP   \


These changes are part of
commit r13-2361-g7e0db0cdf01e9c885a29cb37415f5bc00d90c029
"STABS: remove -gstabs and -gxcoff functionality".  What this does is
remove these identifiers from "poisoning":

 /* As the last action in this file, we poison the identifiers that
shouldn't be used.
 [...]
 /* Other obsolete target macros, or macros that used to be in target
headers and were not used, and may be obsolete or may never have
been used.  */
  #pragma GCC poison [...]

Shouldn't these identifiers actually stay (so that any accidental future
use gets flagged, as I understand this machinery), and instead more
identifiers be added potentially: those where their definition/use got
removed with "STABS: remove -gstabs and -gxcoff functionality"?  (I've
not checked.)


Well, the identifiers are not used any longer, so I don't think we should
poison them. Or do I miss something?

Martin




Grüße
  Thomas
-
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




Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-11-04 Thread Thomas Schwinge
Hi!

On 2022-09-01T12:05:23+0200, Martin Liška  wrote:
> gcc/ChangeLog:

> --- a/gcc/system.h
> +++ b/gcc/system.h
> @@ -1009,8 +1009,7 @@ extern void fancy_abort (const char *, int, const char 
> *)
>   ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL HOST_WORDS_BIG_ENDIAN\
>   OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA ROUND_TYPE_SIZE\
>   ROUND_TYPE_SIZE_UNIT CONST_SECTION_ASM_OP CRT_GET_RFIB_TEXT\
> - DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
> - DBX_WORKING_DIRECTORY INSN_CACHE_DEPTH INSN_CACHE_SIZE \
> + INSN_CACHE_DEPTH INSN_CACHE_SIZE   \
>   INSN_CACHE_LINE_WIDTH INIT_SECTION_PREAMBLE NEED_ATEXIT ON_EXIT\
>   EXIT_BODY OBJECT_FORMAT_ROSE MULTIBYTE_CHARS MAP_CHARACTER \
>   LIBGCC_NEEDS_DOUBLE FINAL_PRESCAN_LABEL DEFAULT_CALLER_SAVES   \
> @@ -1023,15 +1022,14 @@ extern void fancy_abort (const char *, int, const 
> char *)
>   MAX_WCHAR_TYPE_SIZE SHARED_SECTION_ASM_OP INTEGRATE_THRESHOLD  \
>   FINAL_REG_PARM_STACK_SPACE MAYBE_REG_PARM_STACK_SPACE  \
>   TRADITIONAL_PIPELINE_INTERFACE DFA_PIPELINE_INTERFACE  \
> - DBX_OUTPUT_STANDARD_TYPES BUILTIN_SETJMP_FRAME_VALUE   \
> + BUILTIN_SETJMP_FRAME_VALUE \
>   SUNOS4_SHARED_LIBRARIES PROMOTE_FOR_CALL_ONLY  \
>   SPACE_AFTER_L_OPTION NO_RECURSIVE_FUNCTION_CSE \
>   DEFAULT_MAIN_RETURN TARGET_MEM_FUNCTIONS EXPAND_BUILTIN_VA_ARG \
>   COLLECT_PARSE_FLAG DWARF2_GENERATE_TEXT_SECTION_LABEL WINNING_GDB  \
>   ASM_OUTPUT_FILENAME ASM_OUTPUT_SOURCE_LINE FILE_NAME_JOINER\
> - GDB_INV_REF_REGPARM_STABS_LETTER DBX_MEMPARM_STABS_LETTER  \
> - PUT_SDB_SRC_FILE STABS_GCC_MARKER DBX_OUTPUT_FUNCTION_END  \
> - DBX_OUTPUT_GCC_MARKER DBX_FINISH_SYMBOL SDB_GENERATE_FAKE  \
> + GDB_INV_REF_REGPARM_STABS_LETTER   \
> + PUT_SDB_SRC_FILE STABS_GCC_MARKER SDB_GENERATE_FAKE\
>   NON_SAVING_SETJMP TARGET_LATE_RTL_PROLOGUE_EPILOGUE\
>   CASE_DROPS_THROUGH TARGET_BELL TARGET_BS TARGET_CR TARGET_DIGIT0   \
>  TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT\
> @@ -1056,8 +1054,8 @@ extern void fancy_abort (const char *, int, const char 
> *)
>   PREFERRED_OUTPUT_RELOAD_CLASS SYSTEM_INCLUDE_DIR   \
>   STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT\
>   LINK_ELIMINATE_DUPLICATE_LDIRECTORIES MIPS_DEBUGGING_INFO  \
> - IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES DBX_OUTPUT_LBRAC\
> - DBX_OUTPUT_NFUN DBX_OUTPUT_RBRAC RANGE_TEST_NON_SHORT_CIRCUIT  \
> + IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES \
> + RANGE_TEST_NON_SHORT_CIRCUIT   \
>   REAL_VALUE_TRUNCATE REVERSE_CONDEXEC_PREDICATES_P  \
>   TARGET_ALIGN_ANON_BITFIELDS TARGET_NARROW_VOLATILE_BITFIELDS   \
>   IDENT_ASM_OP UNALIGNED_SHORT_ASM_OP UNALIGNED_INT_ASM_OP   \

These changes are part of
commit r13-2361-g7e0db0cdf01e9c885a29cb37415f5bc00d90c029
"STABS: remove -gstabs and -gxcoff functionality".  What this does is
remove these identifiers from "poisoning":

/* As the last action in this file, we poison the identifiers that
   shouldn't be used.
[...]
/* Other obsolete target macros, or macros that used to be in target
   headers and were not used, and may be obsolete or may never have
   been used.  */
 #pragma GCC poison [...]

Shouldn't these identifiers actually stay (so that any accidental future
use gets flagged, as I understand this machinery), and instead more
identifiers be added potentially: those where their definition/use got
removed with "STABS: remove -gstabs and -gxcoff functionality"?  (I've
not checked.)


Grüße
 Thomas
-
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


Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-11-04 Thread Thomas Schwinge
Hi!

On 2022-11-04T10:04:59+0100,  wrote:
> On 2022-10-12T11:21:19+0200, Martin Liška  wrote:
>> On 10/10/22 16:19, Thomas Schwinge wrote:
>>> attached
>>> "Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'".
>
>> Thanks for the fix, really appreciated!
>
> Pushed to master branch commit 4ee35c11fd328728c12f3e086ae016ca94624bf8
> "Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'"

..., see attached now.  ;-)


Grüße
 Thomas


-
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
>From 4ee35c11fd328728c12f3e086ae016ca94624bf8 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge 
Date: Sun, 9 Oct 2022 22:39:02 +0200
Subject: [PATCH] Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR',
 'TARGET_ASM_DESTRUCTOR'

... that got lost in commit 7e0db0cdf01e9c885a29cb37415f5bc00d90c029
"STABS: remove -gstabs and -gxcoff functionality".

Previously, if a back end was not 'USE_COLLECT2', nor manually defined
'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR', or got pointed to the
respective 'default_[...]' functions due to 'CTORS_SECTION_ASM_OP',
'DTORS_SECTION_ASM_OP', or 'TARGET_ASM_NAMED_SECTION', it got pointed to
'default_stabs_asm_out_constructor', 'default_stabs_asm_out_destructor'.
These would emit 'sorry' for any global constructor/destructor they're
run into.

This is now gone, and thus in such a back end configuration case
'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' don't get defined
anymore, and thus the subsequently following:

#if !defined(TARGET_HAVE_CTORS_DTORS)
# if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
# define TARGET_HAVE_CTORS_DTORS true
# endif
#endif

... doesn't define 'TARGET_HAVE_CTORS_DTORS' anymore, and thus per my
understanding, 'gcc/final.cc:rest_of_handle_final':

if (DECL_STATIC_CONSTRUCTOR (current_function_decl)
&& targetm.have_ctors_dtors)
  targetm.asm_out.constructor (XEXP (DECL_RTL (current_function_decl), 0),
   decl_init_priority_lookup
 (current_function_decl));
if (DECL_STATIC_DESTRUCTOR (current_function_decl)
&& targetm.have_ctors_dtors)
  targetm.asm_out.destructor (XEXP (DECL_RTL (current_function_decl), 0),
  decl_fini_priority_lookup
(current_function_decl));

... simply does nothing anymore for a 'DECL_STATIC_CONSTRUCTOR',
'DECL_STATIC_DESTRUCTOR'.

This, effectively, means that GCC/nvptx now suddenly appears to "support"
global constructors/destructors, which means that a ton of test cases now
erroneously PASS that previously used to FAIL:

sorry, unimplemented: global constructors not supported on this target

Of course, such support didn't magically happen due to
"STABS: remove -gstabs and -gxcoff functionality", so this is bad.  And,
corresponding execution testing then regularly FAILs (due to the global
constructor/destructor functions never being invoked), for example:

[-UNSUPPORTED:-]{+PASS:+} gcc.dg/initpri1.c {+(test for excess errors)+}
{+FAIL: gcc.dg/initpri1.c execution test+}

[-UNSUPPORTED:-]{+PASS:+} g++.dg/special/conpr-1.C {+(test for excess errors)+}
{+FAIL: g++.dg/special/conpr-1.C execution test+}

To restore the previous GCC/nvptx behavior, for traceability, this simply
restores the previous code, stripped down to the bare minimum.

	gcc/
	* Makefile.in (OBJS): Add 'dbxout.o'.
	* config/nvptx/nvptx.cc: '#include "dbxout.h"'.
	* dbxout.cc: New.
	* dbxout.h: Likewise.
	* target-def.h (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR):
	Default to 'default_stabs_asm_out_constructor',
	'default_stabs_asm_out_destructor'.
---
 gcc/Makefile.in   |  1 +
 gcc/config/nvptx/nvptx.cc |  1 +
 gcc/dbxout.cc | 43 +++
 gcc/dbxout.h  | 25 +++
 gcc/target-def.h  |  4 
 5 files changed, 74 insertions(+)
 create mode 100644 gcc/dbxout.cc
 create mode 100644 gcc/dbxout.h

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f672e6ea5498..c4072d06a936 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1355,6 +1355,7 @@ OBJS = \
 	data-streamer.o \
 	data-streamer-in.o \
 	data-streamer-out.o \
+	dbxout.o \
 	dbgcnt.o \
 	dce.o \
 	ddg.o \
diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index 2fe120b38730..4cb5d02d40cd 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -52,6 +52,7 @@
 #include "tm-preds.h"
 #include "tm-constrs.h"
 #include "langhooks.h"
+#include "dbxout.h"
 #include "cfgrtl.h"
 #include "gimple.h"
 #include "stor-layout.h"
diff --git a/gcc/dbxout.cc b/gcc/dbxout.cc
new file mode 100644
index ..161eeb196537
--- 

Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-11-04 Thread Thomas Schwinge
Hi!

On 2022-10-12T11:21:19+0200, Martin Liška  wrote:
> On 10/10/22 16:19, Thomas Schwinge wrote:
>> attached
>> "Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'".

> Thanks for the fix, really appreciated!

Pushed to master branch commit 4ee35c11fd328728c12f3e086ae016ca94624bf8
"Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'",
see attached.


Grüße
 Thomas
-
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


Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-10-12 Thread Martin Liška
On 10/10/22 16:19, Thomas Schwinge wrote:
> Hi!
> 
> On 2022-09-01T12:05:23+0200, Martin Liška  wrote:
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> I've also built all cross compilers.
> 
> First: thanks for that: clean up plus "built all cross compilers"!
> 
> But yet, I've now tracked down an issue related to these changes,
> apparently only visible via the nvptx back end -- and quite
> non-obvious...  ;-)
> 
>> --- a/gcc/config/nvptx/nvptx.cc
>> +++ b/gcc/config/nvptx/nvptx.cc
>> @@ -52,7 +52,6 @@
>>  #include "tm-preds.h"
>>  #include "tm-constrs.h"
>>  #include "langhooks.h"
>> -#include "dbxout.h"
>>  #include "cfgrtl.h"
>>  #include "gimple.h"
>>  #include "stor-layout.h"
> 
>> --- a/gcc/dbxout.cc
>> +++ /dev/null
>> @@ -1,3936 +0,0 @@
>> -/* Output dbx-format symbol table information from GNU compiler.
> 
> The "dbx-format symbol table information" stuff indeed is not relevant
> anymore, but:
> 
>> -/* Record an element in the table of global destructors.  SYMBOL is
>> -   a SYMBOL_REF of the function to be called; PRIORITY is a number
>> -   between 0 and MAX_INIT_PRIORITY.  */
>> -
>> -void
>> -default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
>> -   int priority ATTRIBUTE_UNUSED)
>> -{
>> -#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
>> -  /* Tell GNU LD that this is part of the static destructor set.
>> - This will work for any system that uses stabs, most usefully
>> - aout systems.  */
>> -  dbxout_begin_simple_stabs ("___DTOR_LIST__", 22 /* N_SETT */);
>> -  dbxout_stab_value_label (XSTR (symbol, 0));
>> -#else
>> -  sorry ("global destructors not supported on this target");
>> -#endif
>> -}
>> -
>> -/* Likewise for global constructors.  */
>> -
>> -void
>> -default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
>> -int priority ATTRIBUTE_UNUSED)
>> -{
>> -#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
>> -  /* Tell GNU LD that this is part of the static destructor set.
>> - This will work for any system that uses stabs, most usefully
>> - aout systems.  */
>> -  dbxout_begin_simple_stabs ("___CTOR_LIST__", 22 /* N_SETT */);
>> -  dbxout_stab_value_label (XSTR (symbol, 0));
>> -#else
>> -  sorry ("global constructors not supported on this target");
>> -#endif
>> -}
> 
>> --- a/gcc/dbxout.h
>> +++ /dev/null
>> @@ -1,60 +0,0 @@
>> -/* dbxout.h - Various declarations for functions found in dbxout.cc
> 
>> -extern void default_stabs_asm_out_destructor (rtx, int);
>> -extern void default_stabs_asm_out_constructor (rtx, int);
> 
> ... these two functions, 'default_stabs_asm_out_constructor',
> 'default_stabs_asm_out_destructor' (specifically, now their 'sorry'
> branches only) used to serve as default 'TARGET_ASM_CONSTRUCTOR',
> 'TARGET_ASM_DESTRUCTOR' via...
> 
>> --- a/gcc/target-def.h
>> +++ b/gcc/target-def.h
> 
> |  #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
> |  # ifdef CTORS_SECTION_ASM_OP
> |  #  define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
>>  # else
>>  #  ifdef TARGET_ASM_NAMED_SECTION
>>  #   define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
>> -#  else
>> -#   define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
>>  #  endif
>>  # endif
>>  #endif
>> @@ -74,8 +72,6 @@
> |  #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
> |  # ifdef DTORS_SECTION_ASM_OP
> |  #  define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
>>  # else
>>  #  ifdef TARGET_ASM_NAMED_SECTION
>>  #   define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
>> -#  else
>> -#   define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
>>  #  endif
>>  # endif
>>  #endif
> 
> ... this setup here (manually added some more context to the 'diff').
> 
> That is, if a back end was not 'USE_COLLECT2', nor manually defined
> 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR', or got pointed to the
> respective 'default_[...]'  functions due to 'CTORS_SECTION_ASM_OP',
> 'DTORS_SECTION_ASM_OP', or 'TARGET_ASM_NAMED_SECTION', it got pointed to
> 'default_stabs_asm_out_constructor', 'default_stabs_asm_out_destructor'.
> These would emit 'sorry' for any global constructor/destructor they're
> run into.
> 
> This is now gone, and thus in such a back end configuration case
> 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' don't get defined
> anymore, and thus the subsequently following:
> 
> #if !defined(TARGET_HAVE_CTORS_DTORS)
> # if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
> # define TARGET_HAVE_CTORS_DTORS true
> # endif
> #endif
> 
> ... doesn't define 'TARGET_HAVE_CTORS_DTORS' anymore, and thus per my
> understanding, 'gcc/final.cc:rest_of_handle_final':
> 
> if (DECL_STATIC_CONSTRUCTOR (current_function_decl)
> && targetm.have_ctors_dtors)
>   targetm.asm_out.constructor (XEXP 

Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 10, 2022 at 4:23 PM Tom de Vries  wrote:
>
> On 10/10/22 16:19, Thomas Schwinge wrote:
> > With that, OK to push?
>
> FWIW, nvptx change looks in the obvious category to me.

Can you rename the functions as default_asm_out_* and instead of
reviving dbxout.cc
put them into targhooks.cc?

OK with that change.

Richard.

> Thanks,
> - Tom


Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-10-10 Thread Tom de Vries via Gcc-patches

On 10/10/22 16:19, Thomas Schwinge wrote:

With that, OK to push?


FWIW, nvptx change looks in the obvious category to me.

Thanks,
- Tom


Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-10-10 Thread Thomas Schwinge
Hi!

On 2022-09-01T12:05:23+0200, Martin Liška  wrote:
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> I've also built all cross compilers.

First: thanks for that: clean up plus "built all cross compilers"!

But yet, I've now tracked down an issue related to these changes,
apparently only visible via the nvptx back end -- and quite
non-obvious...  ;-)

> --- a/gcc/config/nvptx/nvptx.cc
> +++ b/gcc/config/nvptx/nvptx.cc
> @@ -52,7 +52,6 @@
>  #include "tm-preds.h"
>  #include "tm-constrs.h"
>  #include "langhooks.h"
> -#include "dbxout.h"
>  #include "cfgrtl.h"
>  #include "gimple.h"
>  #include "stor-layout.h"

> --- a/gcc/dbxout.cc
> +++ /dev/null
> @@ -1,3936 +0,0 @@
> -/* Output dbx-format symbol table information from GNU compiler.

The "dbx-format symbol table information" stuff indeed is not relevant
anymore, but:

> -/* Record an element in the table of global destructors.  SYMBOL is
> -   a SYMBOL_REF of the function to be called; PRIORITY is a number
> -   between 0 and MAX_INIT_PRIORITY.  */
> -
> -void
> -default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
> -   int priority ATTRIBUTE_UNUSED)
> -{
> -#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
> -  /* Tell GNU LD that this is part of the static destructor set.
> - This will work for any system that uses stabs, most usefully
> - aout systems.  */
> -  dbxout_begin_simple_stabs ("___DTOR_LIST__", 22 /* N_SETT */);
> -  dbxout_stab_value_label (XSTR (symbol, 0));
> -#else
> -  sorry ("global destructors not supported on this target");
> -#endif
> -}
> -
> -/* Likewise for global constructors.  */
> -
> -void
> -default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
> -int priority ATTRIBUTE_UNUSED)
> -{
> -#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
> -  /* Tell GNU LD that this is part of the static destructor set.
> - This will work for any system that uses stabs, most usefully
> - aout systems.  */
> -  dbxout_begin_simple_stabs ("___CTOR_LIST__", 22 /* N_SETT */);
> -  dbxout_stab_value_label (XSTR (symbol, 0));
> -#else
> -  sorry ("global constructors not supported on this target");
> -#endif
> -}

> --- a/gcc/dbxout.h
> +++ /dev/null
> @@ -1,60 +0,0 @@
> -/* dbxout.h - Various declarations for functions found in dbxout.cc

> -extern void default_stabs_asm_out_destructor (rtx, int);
> -extern void default_stabs_asm_out_constructor (rtx, int);

... these two functions, 'default_stabs_asm_out_constructor',
'default_stabs_asm_out_destructor' (specifically, now their 'sorry'
branches only) used to serve as default 'TARGET_ASM_CONSTRUCTOR',
'TARGET_ASM_DESTRUCTOR' via...

> --- a/gcc/target-def.h
> +++ b/gcc/target-def.h

|  #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
|  # ifdef CTORS_SECTION_ASM_OP
|  #  define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
>  # else
>  #  ifdef TARGET_ASM_NAMED_SECTION
>  #   define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
> -#  else
> -#   define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
>  #  endif
>  # endif
>  #endif
> @@ -74,8 +72,6 @@
|  #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
|  # ifdef DTORS_SECTION_ASM_OP
|  #  define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
>  # else
>  #  ifdef TARGET_ASM_NAMED_SECTION
>  #   define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
> -#  else
> -#   define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
>  #  endif
>  # endif
>  #endif

... this setup here (manually added some more context to the 'diff').

That is, if a back end was not 'USE_COLLECT2', nor manually defined
'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR', or got pointed to the
respective 'default_[...]'  functions due to 'CTORS_SECTION_ASM_OP',
'DTORS_SECTION_ASM_OP', or 'TARGET_ASM_NAMED_SECTION', it got pointed to
'default_stabs_asm_out_constructor', 'default_stabs_asm_out_destructor'.
These would emit 'sorry' for any global constructor/destructor they're
run into.

This is now gone, and thus in such a back end configuration case
'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' don't get defined
anymore, and thus the subsequently following:

#if !defined(TARGET_HAVE_CTORS_DTORS)
# if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
# define TARGET_HAVE_CTORS_DTORS true
# endif
#endif

... doesn't define 'TARGET_HAVE_CTORS_DTORS' anymore, and thus per my
understanding, 'gcc/final.cc:rest_of_handle_final':

if (DECL_STATIC_CONSTRUCTOR (current_function_decl)
&& targetm.have_ctors_dtors)
  targetm.asm_out.constructor (XEXP (DECL_RTL (current_function_decl), 0),
   decl_init_priority_lookup
 (current_function_decl));
if (DECL_STATIC_DESTRUCTOR (current_function_decl)
&& 

Re: [COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-09-14 Thread Martin Liška
On 9/14/22 14:19, Jan-Benedict Glaw wrote:
> On Thu, 2022-09-01 12:05:23 +0200, Martin Liška  wrote:
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> I've also built all cross compilers.
>>
>> Ready to be installed?
>> Thanks,
>> Martin
>>
>> gcc/ChangeLog:
>>
>>  * Makefile.in: Remove -gstabs option support, DBX-related
>>macros and DBX debugging info support.
> [...]
>>  * config/mips/mips.cc (mips_output_filename): Likewise.
>>  (mips_option_override): Likewise.
> [...]
>> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
>> index e81a245dcf4..47724950c3e 100644
>> --- a/gcc/config/mips/mips.cc
>> +++ b/gcc/config/mips/mips.cc
> [...]
>> @@ -20505,24 +20500,13 @@ mips_option_override (void)
>>  
>>for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>>  {
>> -  mips_dbx_regno[i] = IGNORED_DWARF_REGNUM;
>>if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i))
>>  mips_dwarf_regno[i] = i;
>>else
>>  mips_dwarf_regno[i] = INVALID_REGNUM;
>>  }
>>  
>> -  start = GP_DBX_FIRST - GP_REG_FIRST;
>> -  for (i = GP_REG_FIRST; i <= GP_REG_LAST; i++)
>> -mips_dbx_regno[i] = i + start;
>> -
>> -  start = FP_DBX_FIRST - FP_REG_FIRST;
>> -  for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
>> -mips_dbx_regno[i] = i + start;
>> -
>>/* Accumulator debug registers use big-endian ordering.  */
>> -  mips_dbx_regno[HI_REGNUM] = MD_DBX_FIRST + 0;
>> -  mips_dbx_regno[LO_REGNUM] = MD_DBX_FIRST + 1;
>>mips_dwarf_regno[HI_REGNUM] = MD_REG_FIRST + 0;
>>mips_dwarf_regno[LO_REGNUM] = MD_REG_FIRST + 1;
>>for (i = DSP_ACC_REG_FIRST; i <= DSP_ACC_REG_LAST; i += 2)
> 
> This leaves the `start` variable unused, resulting in a new warning.
> Fixed (committed as obvious) by this:
> 
> /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
> -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
> -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
> -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
> -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror 
> -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
> -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
> -I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
> -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I../../gcc/gcc/../libbacktrace   -o mips.o -MT mips.o -MMD -MP -MF 
> ./.deps/mips.TPo ../../gcc/gcc/config/mips/mips.cc
> ../../gcc/gcc/config/mips/mips.cc: In function 'void mips_option_override()':
> ../../gcc/gcc/config/mips/mips.cc:20021:10: error: unused variable 'start' 
> [-Werror=unused-variable]
> 20021 |   int i, start, regno, mode;
>   |  ^
> 
> 2022-09-14  Jan-Benedict Glaw  
> 
> gcc/
>   * config/mips/mips.cc (mips_option_override): Drop unused variable.
> 
> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
> index 47724950c3e..387376b3df8 100644
> --- a/gcc/config/mips/mips.cc
> +++ b/gcc/config/mips/mips.cc
> @@ -20018,7 +20018,7 @@ mips_set_tune (const struct mips_cpu_info *info)
>  static void
>  mips_option_override (void)
>  {
> -  int i, start, regno, mode;
> +  int i, regno, mode;
>  
>if (OPTION_SET_P (mips_isa_option))
>  mips_isa_option_info = _cpu_info_table[mips_isa_option];
> 
> 
> Committed as obvious.
> 
> MfG, JBG
> 

Thanks for the commit!

Cheers,
Martin


[COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-09-14 Thread Jan-Benedict Glaw
On Thu, 2022-09-01 12:05:23 +0200, Martin Liška  wrote:
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> I've also built all cross compilers.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
>   * Makefile.in: Remove -gstabs option support, DBX-related
> macros and DBX debugging info support.
[...]
>   * config/mips/mips.cc (mips_output_filename): Likewise.
>   (mips_option_override): Likewise.
[...]
> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
> index e81a245dcf4..47724950c3e 100644
> --- a/gcc/config/mips/mips.cc
> +++ b/gcc/config/mips/mips.cc
[...]
> @@ -20505,24 +20500,13 @@ mips_option_override (void)
>  
>for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>  {
> -  mips_dbx_regno[i] = IGNORED_DWARF_REGNUM;
>if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i))
>   mips_dwarf_regno[i] = i;
>else
>   mips_dwarf_regno[i] = INVALID_REGNUM;
>  }
>  
> -  start = GP_DBX_FIRST - GP_REG_FIRST;
> -  for (i = GP_REG_FIRST; i <= GP_REG_LAST; i++)
> -mips_dbx_regno[i] = i + start;
> -
> -  start = FP_DBX_FIRST - FP_REG_FIRST;
> -  for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
> -mips_dbx_regno[i] = i + start;
> -
>/* Accumulator debug registers use big-endian ordering.  */
> -  mips_dbx_regno[HI_REGNUM] = MD_DBX_FIRST + 0;
> -  mips_dbx_regno[LO_REGNUM] = MD_DBX_FIRST + 1;
>mips_dwarf_regno[HI_REGNUM] = MD_REG_FIRST + 0;
>mips_dwarf_regno[LO_REGNUM] = MD_REG_FIRST + 1;
>for (i = DSP_ACC_REG_FIRST; i <= DSP_ACC_REG_LAST; i += 2)

This leaves the `start` variable unused, resulting in a new warning.
Fixed (committed as obvious) by this:

/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2   -DIN_GCC  
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. 
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber 
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../gcc/gcc/../libbacktrace   -o mips.o -MT mips.o -MMD -MP -MF 
./.deps/mips.TPo ../../gcc/gcc/config/mips/mips.cc
../../gcc/gcc/config/mips/mips.cc: In function 'void mips_option_override()':
../../gcc/gcc/config/mips/mips.cc:20021:10: error: unused variable 'start' 
[-Werror=unused-variable]
20021 |   int i, start, regno, mode;
  |  ^

2022-09-14  Jan-Benedict Glaw  

gcc/
* config/mips/mips.cc (mips_option_override): Drop unused variable.

diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index 47724950c3e..387376b3df8 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -20018,7 +20018,7 @@ mips_set_tune (const struct mips_cpu_info *info)
 static void
 mips_option_override (void)
 {
-  int i, start, regno, mode;
+  int i, regno, mode;
 
   if (OPTION_SET_P (mips_isa_option))
 mips_isa_option_info = _cpu_info_table[mips_isa_option];


Committed as obvious.

MfG, JBG

-- 


signature.asc
Description: PGP signature


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-07 Thread Martin Liška
On 9/6/22 19:00, David Edelsohn wrote:
>   * dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise.
>   (HAVE_XCOFF_DWARF_EXTRAS): Likewise.
>   (output_fde): Likewise.
>   (output_call_frame_info): Likewise.
>   (have_macinfo): Likewise.
>   (add_AT_loc_list): Likewise.
>   (add_AT_view_list): Likewise.
>   (output_compilation_unit_header): Likewise.
>   (output_pubnames): Likewise.
>   (output_aranges): Likewise.
>   (output_line_info): Likewise.
>   (output_macinfo): Likewise.
>   (dwarf2out_finish): Likewise.
>   (dwarf2out_early_finish): Likewise.
> 
> These changes are not correct and break AIX bootstrap.
> 
> Those changes are not related to stabs support. We agreed to remove stabs and
> 
> XCOFF stabs support, not GCC DWARF debugging support for AIX.

Sorry for the breakage, I've just sent a patch that restores that.

Cheers,
Martin

> 
> Also
> 
>   * configure: Regenerate. Likewise.
>   * configure.ac : Likewise.
> 
> does not list that tests for HAVE_XCOFF_DWARF_EXTRAS was removed, so the 
> ChangeLog was not accurate.
> 
> Again, that test is required for AIX is not part of stabs support.
> 
> 
> Please revert this change so that AIX can continue to be bootstrapped and 
> tested, and we can work together to test a corrected patch.
> 
> Thanks, David
> 
> 
> On Tue, Sep 6, 2022 at 12:31 PM David Edelsohn  > wrote:
> 
> I fully support the plan to remove stabs support, but this patch broke 
> bootstrap on AIX.  It seems rather bad policy to remove support for a feature 
> without ensuring that the removal does not negatively impact the targets 
> touched by the patch.  I should have been explicitly copied on these patches 
> and I should have been asked to test the patches before they were installed, 
> if for no other reason than politeness and consideration.
> 
> Thanks, David
> 
> 



Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
* dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise.
(HAVE_XCOFF_DWARF_EXTRAS): Likewise.
(output_fde): Likewise.
(output_call_frame_info): Likewise.
(have_macinfo): Likewise.
(add_AT_loc_list): Likewise.
(add_AT_view_list): Likewise.
(output_compilation_unit_header): Likewise.
(output_pubnames): Likewise.
(output_aranges): Likewise.
(output_line_info): Likewise.
(output_macinfo): Likewise.
(dwarf2out_finish): Likewise.
(dwarf2out_early_finish): Likewise.

These changes are not correct and break AIX bootstrap.

Those changes are not related to stabs support.  We agreed to remove stabs and

XCOFF stabs support, not GCC DWARF debugging support for AIX.

Also

* configure: Regenerate. Likewise.
* configure.ac: Likewise.

does not list that tests for HAVE_XCOFF_DWARF_EXTRAS was removed, so
the ChangeLog was not accurate.

Again, that test is required for AIX is not part of stabs support.


Please revert this change so that AIX can continue to be bootstrapped
and tested, and we can work together to test a corrected patch.

Thanks, David


On Tue, Sep 6, 2022 at 12:31 PM David Edelsohn  wrote:

> I fully support the plan to remove stabs support, but this patch broke
> bootstrap on AIX.  It seems rather bad policy to remove support for a
> feature without ensuring that the removal does not negatively impact the
> targets touched by the patch.  I should have been explicitly copied on
> these patches and I should have been asked to test the patches before they
> were installed, if for no other reason than politeness and consideration.
>
> Thanks, David
>
>
>


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
I fully support the plan to remove stabs support, but this patch broke
bootstrap on AIX.  It seems rather bad policy to remove support for a
feature without ensuring that the removal does not negatively impact the
targets touched by the patch.  I should have been explicitly copied on
these patches and I should have been asked to test the patches before they
were installed, if for no other reason than politeness and consideration.

Thanks, David


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-05 Thread Richard Biener via Gcc-patches
On Mon, Sep 5, 2022 at 9:59 AM Martin Liška  wrote:
>
> On 9/2/22 10:54, Richard Biener wrote:
> > On Fri, Sep 2, 2022 at 9:00 AM Martin Liška  wrote:
> >>
> >> On 9/1/22 13:18, Richard Biener wrote:
> >>> I presume WarnRemoved will diagnose use of -gstabs but not fail
> >>> compilation.  Will -gstabs then still enable -g (with the default debug
> >>> format)?
> >>
> >> No, it won't set -g option.
> >
> > That was the usual side-effect - I wonder if we want to emit extra
> > diagnostic when one of the obsolete options is given but -g is not
> > enabled in the end or whether we want to preserve the debug info
> > enablement effect?
>
> I would leave it for now and see if somebody would complain about
> the current behavior.
>
> >
> >>>
> >>> Please followup with a gcc-13/changes.html entry.
> >>
> >> Sure.
> >>
> >>>
> >>> I notice we have VMS_DEBUGGING_INFO left.  From a quick look
> >>> it is used by alpha*-dec-* (exclusively) and ia64-hp-*vms*  (maybe
> >>> also supports DWARF, it is ELF at least).  One of the goals of
> >>> non-DWARF removal was to get rid of debug hooks and instead allow
> >>> "free-form" early debug generation from the frontends.
> >>
> >> Can you please explain what you mean by the free-form and what's expected
> >> to do with the VMS_DEBUGGING_INFO macro?
> >
> > Well, VMS debugging would go, just like STABS.
>
> Can go now, or shall we deprecate it in GCC 13 first?

Let's ask VMS maintainers - what's the state of DWARF support in VMS?
Is there active use of alpha*-dec-* or ia64-hp-*vms*?

> > With "free-form" I mean
> > that frontend code could call into the dwarf2out API directly, creating
> > DWARF DIEs for language specific info (we probably want to export more
> > and/or nicer APIs for such use).
>
> Ok, so bypassing dwarf2_debug_hooks, right? I can leave it to you such API
> improvement. What do you think?

Sure, it shouldn't be part of this series.

Richard.

> Cheers,
> Martin
>
> >
> > Richard.
> >
> >> Cheers,
> >> Martin
>


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-05 Thread Martin Liška
On 9/2/22 10:54, Richard Biener wrote:
> On Fri, Sep 2, 2022 at 9:00 AM Martin Liška  wrote:
>>
>> On 9/1/22 13:18, Richard Biener wrote:
>>> I presume WarnRemoved will diagnose use of -gstabs but not fail
>>> compilation.  Will -gstabs then still enable -g (with the default debug
>>> format)?
>>
>> No, it won't set -g option.
> 
> That was the usual side-effect - I wonder if we want to emit extra
> diagnostic when one of the obsolete options is given but -g is not
> enabled in the end or whether we want to preserve the debug info
> enablement effect?

I would leave it for now and see if somebody would complain about
the current behavior.

> 
>>>
>>> Please followup with a gcc-13/changes.html entry.
>>
>> Sure.
>>
>>>
>>> I notice we have VMS_DEBUGGING_INFO left.  From a quick look
>>> it is used by alpha*-dec-* (exclusively) and ia64-hp-*vms*  (maybe
>>> also supports DWARF, it is ELF at least).  One of the goals of
>>> non-DWARF removal was to get rid of debug hooks and instead allow
>>> "free-form" early debug generation from the frontends.
>>
>> Can you please explain what you mean by the free-form and what's expected
>> to do with the VMS_DEBUGGING_INFO macro?
> 
> Well, VMS debugging would go, just like STABS.

Can go now, or shall we deprecate it in GCC 13 first?

> With "free-form" I mean
> that frontend code could call into the dwarf2out API directly, creating
> DWARF DIEs for language specific info (we probably want to export more
> and/or nicer APIs for such use).

Ok, so bypassing dwarf2_debug_hooks, right? I can leave it to you such API
improvement. What do you think?

Cheers,
Martin

> 
> Richard.
> 
>> Cheers,
>> Martin



Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-02 Thread Richard Biener via Gcc-patches
On Fri, Sep 2, 2022 at 9:00 AM Martin Liška  wrote:
>
> On 9/1/22 13:18, Richard Biener wrote:
> > I presume WarnRemoved will diagnose use of -gstabs but not fail
> > compilation.  Will -gstabs then still enable -g (with the default debug
> > format)?
>
> No, it won't set -g option.

That was the usual side-effect - I wonder if we want to emit extra
diagnostic when one of the obsolete options is given but -g is not
enabled in the end or whether we want to preserve the debug info
enablement effect?

> >
> > Please followup with a gcc-13/changes.html entry.
>
> Sure.
>
> >
> > I notice we have VMS_DEBUGGING_INFO left.  From a quick look
> > it is used by alpha*-dec-* (exclusively) and ia64-hp-*vms*  (maybe
> > also supports DWARF, it is ELF at least).  One of the goals of
> > non-DWARF removal was to get rid of debug hooks and instead allow
> > "free-form" early debug generation from the frontends.
>
> Can you please explain what you mean by the free-form and what's expected
> to do with the VMS_DEBUGGING_INFO macro?

Well, VMS debugging would go, just like STABS.  With "free-form" I mean
that frontend code could call into the dwarf2out API directly, creating
DWARF DIEs for language specific info (we probably want to export more
and/or nicer APIs for such use).

Richard.

> Cheers,
> Martin


Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-02 Thread Martin Liška

On 9/1/22 13:18, Richard Biener wrote:

I presume WarnRemoved will diagnose use of -gstabs but not fail
compilation.  Will -gstabs then still enable -g (with the default debug
format)?


No, it won't set -g option.



Please followup with a gcc-13/changes.html entry.


Sure.



I notice we have VMS_DEBUGGING_INFO left.  From a quick look
it is used by alpha*-dec-* (exclusively) and ia64-hp-*vms*  (maybe
also supports DWARF, it is ELF at least).  One of the goals of
non-DWARF removal was to get rid of debug hooks and instead allow
"free-form" early debug generation from the frontends.


Can you please explain what you mean by the free-form and what's expected
to do with the VMS_DEBUGGING_INFO macro?

Cheers,
Martin