[PATCH/RFA] Make *_DEBUGGING_INFO defines consistent

Jason R Thorpe thorpej@wasabisystems.com
Thu Aug 29 09:22:00 GMT 2002


The vast majority of places that define *_DEBUGGING_INFO do it like so:

#define DBX_DEBUGGING_INFO

However, a few define with a value, e.g.:

#define DBX_DEBUGGING_INFO 1

Defining with a value is unnecessary, and causes "redefined" warnings on
e.g. the mips-netbsd target (because elfos.h is included before mips/elf.h).

The following patch makes them all consistent (i.e. no value).  OK to
commit?

	* config/elfos.h (DWARF_DEBUGGING_INFO)
	(DWARF2_DEBUGGING_INFO): Define with no value.
	* config/tm-dwarf2.h (DWARF2_DEBUGGING_INFO): Likewise.
	* config/arm/aout.h (DBX_DEBUGGING_INFO): Likewise.
	* config/arm/netbsd.h (DBX_DEBUGGING_INFO): Likewise.
	* config/i386/sco5.h (DWARF2_DEBUGGING_INFO)
	(DWARF_DEBUGGING_INFO, SDB_DEBUGGING_INFO)
	(DBX_DEBUGGING_INFO): Likewise.
	* config/ip2k/ip2k.h (DWARF2_DEBUGGING_INFO): Likewise.
	* config/mcore/mcore-elf.h (DWARF2_DEBUGGING_INFO)
	(DWARF_DEBUGGING_INFO): Likewise.
	* config/mcore/mcore-pe.h (DBX_DEBUGGING_INFO): Likewise.
	* config/sh/elf.h (DWARF2_DEBUGGING_INFO): Likewise.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: config/elfos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/elfos.h,v
retrieving revision 1.51
diff -u -r1.51 elfos.h
--- config/elfos.h	21 Aug 2002 02:41:46 -0000	1.51
+++ config/elfos.h	29 Aug 2002 08:13:23 -0000
@@ -61,13 +61,13 @@
 /* System V Release 4 uses DWARF debugging info.  */
 
 #ifndef DWARF_DEBUGGING_INFO
-#define DWARF_DEBUGGING_INFO 1
+#define DWARF_DEBUGGING_INFO
 #endif
 
 /* All ELF targets can support DWARF-2.  */
 
 #ifndef DWARF2_DEBUGGING_INFO
-#define DWARF2_DEBUGGING_INFO 1
+#define DWARF2_DEBUGGING_INFO
 #endif
 
 /* The GNU tools operate better with dwarf2, and it is required by some
Index: config/tm-dwarf2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/tm-dwarf2.h,v
retrieving revision 1.3
diff -u -r1.3 tm-dwarf2.h
--- config/tm-dwarf2.h	10 Feb 2000 05:32:04 -0000	1.3
+++ config/tm-dwarf2.h	29 Aug 2002 08:13:23 -0000
@@ -1,4 +1,4 @@
 /* Enable Dwarf2 debugging and make it the default */
-#define  DWARF2_DEBUGGING_INFO 1
+#define  DWARF2_DEBUGGING_INFO
 #undef	 PREFERRED_DEBUGGING_TYPE
 #define  PREFERRED_DEBUGGING_TYPE  DWARF2_DEBUG
Index: config/arm/aout.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/aout.h,v
retrieving revision 1.26
diff -u -r1.26 aout.h
--- config/arm/aout.h	31 Jul 2002 02:13:28 -0000	1.26
+++ config/arm/aout.h	29 Aug 2002 08:13:25 -0000
@@ -112,7 +112,7 @@
 /* Generate DBX debugging information.  riscix.h will undefine this because
    the native assembler does not support stabs. */
 #ifndef DBX_DEBUGGING_INFO
-#define DBX_DEBUGGING_INFO  1
+#define DBX_DEBUGGING_INFO
 #endif
 
 /* Acorn dbx moans about continuation chars, so don't use any.  */
Index: config/arm/netbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/netbsd.h,v
retrieving revision 1.19
diff -u -r1.19 netbsd.h
--- config/arm/netbsd.h	29 May 2002 21:31:48 -0000	1.19
+++ config/arm/netbsd.h	29 Aug 2002 08:13:43 -0000
@@ -31,7 +31,7 @@
 #define DEFAULT_SIGNED_CHAR  0
 
 /* Since we always use GAS as our assembler we support stabs.  */
-#define DBX_DEBUGGING_INFO 1
+#define DBX_DEBUGGING_INFO
 
 /*#undef ASM_DECLARE_FUNCTION_NAME*/
 
Index: config/i386/sco5.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sco5.h,v
retrieving revision 1.72
diff -u -r1.72 sco5.h
--- config/i386/sco5.h	21 Aug 2002 02:41:48 -0000	1.72
+++ config/i386/sco5.h	29 Aug 2002 08:13:44 -0000
@@ -419,10 +419,10 @@
 #undef DBX_DEBUGGING_INFO
 #undef PREFERRED_DEBUGGING_TYPE
 
-#define DWARF2_DEBUGGING_INFO 1
-#define DWARF_DEBUGGING_INFO 1
-#define SDB_DEBUGGING_INFO   1
-#define DBX_DEBUGGING_INFO   1
+#define DWARF2_DEBUGGING_INFO
+#define DWARF_DEBUGGING_INFO
+#define SDB_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE					\
   ((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG)
 
Index: config/ip2k/ip2k.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ip2k/ip2k.h,v
retrieving revision 1.6
diff -u -r1.6 ip2k.h
--- config/ip2k/ip2k.h	13 Aug 2002 09:58:37 -0000	1.6
+++ config/ip2k/ip2k.h	29 Aug 2002 08:13:47 -0000
@@ -2548,7 +2548,7 @@
 					 EQ, LEU, GEU}},\
   {"ip2k_signed_comparison_operator", {LT, GT, LE, GE}},
 
-#define DWARF2_DEBUGGING_INFO		1
+#define DWARF2_DEBUGGING_INFO
 
 #define DWARF2_ASM_LINE_DEBUG_INFO	1
 
Index: config/mcore/mcore-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore-elf.h,v
retrieving revision 1.12
diff -u -r1.12 mcore-elf.h
--- config/mcore/mcore-elf.h	25 Jul 2002 05:14:21 -0000	1.12
+++ config/mcore/mcore-elf.h	29 Aug 2002 08:13:47 -0000
@@ -29,7 +29,7 @@
 
 /* Use DWARF2 debugging info.  */
 #ifndef DWARF2_DEBUGGING_INFO
-#define DWARF2_DEBUGGING_INFO 1
+#define DWARF2_DEBUGGING_INFO
 #endif
 
 #undef  PREFERRED_DEBUGGING_TYPE
@@ -37,7 +37,7 @@
 
 /* But allow DWARF 1 if the user wants it.  */
 #ifndef DWARF_DEBUGGING_INFO
-#define DWARF_DEBUGGING_INFO 1
+#define DWARF_DEBUGGING_INFO
 #endif
 
 #define EXPORTS_SECTION_ASM_OP	"\t.section .exports"
Index: config/mcore/mcore-pe.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore-pe.h,v
retrieving revision 1.13
diff -u -r1.13 mcore-pe.h
--- config/mcore/mcore-pe.h	19 May 2002 07:55:37 -0000	1.13
+++ config/mcore/mcore-pe.h	29 Aug 2002 08:13:47 -0000
@@ -34,7 +34,7 @@
 
 #undef  SDB_DEBUGGING_INFO
 #undef  DBX_DEBUGGING_INFO
-#define DBX_DEBUGGING_INFO 1
+#define DBX_DEBUGGING_INFO
 
 /* Computed in toplev.c.  */
 #undef  PREFERRED_DEBUGGING_TYPE
Index: config/sh/elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/elf.h,v
retrieving revision 1.24
diff -u -r1.24 elf.h
--- config/sh/elf.h	31 May 2002 12:04:33 -0000	1.24
+++ config/sh/elf.h	29 Aug 2002 08:13:52 -0000
@@ -21,7 +21,7 @@
 
 /* Generate DWARF2 debugging information and make it the default */
 #undef DWARF2_DEBUGGING_INFO
-#define DWARF2_DEBUGGING_INFO 1
+#define DWARF2_DEBUGGING_INFO
 
 #undef PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG


More information about the Gcc-patches mailing list