This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SPARC config files cleanup 2/n


This patch standardizes the way ELF SPARC targets specify the supported 
debugging formats and the default one:
- dbxelf.h defines DBX_DEBUGGING_INFO,
- elfos.h defines DWARF2_DEBUGGING_INFO and set PREFERRED_DEBUGGING_TYPE to 
DWARF2_DEBUG,
- likewise for tm-dwarf2.h in case the elfos.h settings have been overridden 
in between (like in sol2.h).

Here's a quick summary of the current state of affairs:

sparclite-coff		stabs
sparclite-elf		stabs , dwarf2*

sparc86x-elf		stabs , dwarf2*

sparc-elf		stabs*,dwarf2
sparc-linux		stabs ,dwarf2*
sparc-netbsdelf		stabs ,dwarf2*
sparc-openbsd		stabs
sparc-rtems		stabs*,dwarf2
sparc-sun-solaris2.6	stabs
sparc-sun-solaris	stabs, dwarf2*
sparc-sysv4		stabs, dwarf2*

sparc64-elf		stabs, dwarf2*
sparc64-freebsd		stabs, dwarf2*
sparc64-linux		stabs, dwarf2*
sparc64-netbsd		stabs, dwarf2*
sparc64-openbsd		stabs, dwarf2*
sparc64-sun-solaris	stabs, dwarf2*

[*] for the default.


RTEMS maintainers, Nick, removing the dependencies on the Solaris config files 
will mechanically switch the default from STABS to DWARF-2 for both sparc-elf 
and sparc-rtems (except of course specific counter-measures).  What do you 
think about really doing the switch for 4.0?  They are the last DWARF-capable 
targets that still default to STABS.


Tested by building a cross from Linux/x86-64 to every target (well, that 
builds), compiling a testcase with -g, -gstabs and -gdwarf-2 and examining 
the assembly output.  Applied to mainline.


2005-01-21  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* config.gcc (sparc-*-netbsdelf*): Include dbxelf.h
	(sparc64-*-openbsd*): Likewise.
	(sparclite-*-elf*): Include tm-dwarf2.h.
	(sparc86x-*-elf*): Likewise.
	(sparc64-*-elf*): Likewise.
	* config/sparc/linux64.h (DWARF2_DEBUGGING_INFO): Delete.
	(DBX_DEBUGGING_INFO): Likewise.
	* config/sparc/liteelf.h (DWARF2_DEBUGGING_INFO): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/netbsd-elf.h (PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sp64-elf.h (DBX_DEBUGGING_INFO): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sp86x-elf.h (DWARF2_DEBUGGING_INFO 1): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sparc.h (DBX_DEBUGGING_INFO): Likewise.


-- 
Eric Botcazou
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.508
diff -u -r1.508 config.gcc
--- config.gcc	18 Jan 2005 11:36:02 -0000	1.508
+++ config.gcc	21 Jan 2005 08:41:06 -0000
@@ -1873,7 +1873,7 @@
 	use_fixproto=yes
 	;;
 sparc-*-netbsdelf*)
-	tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
 	;;
 sparc-*-openbsd*)
 	tm_defines=OBSD_OLD_GAS
@@ -1884,7 +1884,7 @@
 	use_collect2=yes
 	;;
 sparc64-*-openbsd*)
-	tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
+	tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
 	gas=yes gnu_ld=yes
 	with_cpu=ultrasparc
 	;;
@@ -1997,19 +1997,19 @@
 	tmake_file=sparc/t-sparclite
 	;;
 sparclite-*-elf*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h tm-dwarf2.h"
 	tmake_file="sparc/t-sparclite sparc/t-crtfm"
         extra_parts="crtbegin.o crtend.o"
 	use_fixproto=yes
 	;;
 sparc86x-*-elf*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h tm-dwarf2.h"
 	tmake_file="sparc/t-sp86x sparc/t-crtfm"
         extra_parts="crtbegin.o crtend.o"
 	use_fixproto=yes
 	;;
 sparc64-*-elf*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h tm-dwarf2.h"
 	tmake_file="${tmake_file} sparc/t-crtfm"
 	extra_parts="crtbegin.o crtend.o"
 	use_fixproto=yes
Index: config/sparc/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/linux64.h,v
retrieving revision 1.90
diff -u -r1.90 linux64.h
--- config/sparc/linux64.h	20 Jan 2005 20:39:42 -0000	1.90
+++ config/sparc/linux64.h	21 Jan 2005 08:41:06 -0000
@@ -289,9 +289,6 @@
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
 
-#define DWARF2_DEBUGGING_INFO 1
-#define DBX_DEBUGGING_INFO 1
-
 #undef ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\
 do {									\
Index: config/sparc/liteelf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/liteelf.h,v
retrieving revision 1.14
diff -u -r1.14 liteelf.h
--- config/sparc/liteelf.h	24 Dec 2003 00:14:25 -0000	1.14
+++ config/sparc/liteelf.h	21 Jan 2005 08:41:06 -0000
@@ -27,13 +27,6 @@
     }						\
   while (0)
 
-/* Default to dwarf2 in ELF.  */
-
-#define DWARF2_DEBUGGING_INFO 1
-
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparclite)");
 
Index: config/sparc/netbsd-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/netbsd-elf.h,v
retrieving revision 1.25
diff -u -r1.25 netbsd-elf.h
--- config/sparc/netbsd-elf.h	20 Jan 2005 20:39:42 -0000	1.25
+++ config/sparc/netbsd-elf.h	21 Jan 2005 08:41:06 -0000
@@ -51,9 +51,6 @@
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
 /* This is the char to use for continuation (in case we need to turn
    continuation back on).  */
 #undef DBX_CONTIN_CHAR
Index: config/sparc/sp64-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sp64-elf.h,v
retrieving revision 1.34
diff -u -r1.34 sp64-elf.h
--- config/sparc/sp64-elf.h	18 Jan 2005 12:01:48 -0000	1.34
+++ config/sparc/sp64-elf.h	21 Jan 2005 08:41:06 -0000
@@ -105,15 +105,6 @@
 #undef JUMP_TABLES_IN_TEXT_SECTION
 #define JUMP_TABLES_IN_TEXT_SECTION 0
 
-/* System V Release 4 uses DWARF debugging info.
-   GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
-   anyway so it is the default.  */
-
-#define DBX_DEBUGGING_INFO 1
-
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
 /* Don't include Solaris-specific format checks.  */
 #undef TARGET_N_FORMAT_TYPES
 #undef TARGET_FORMAT_TYPES
Index: config/sparc/sp86x-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sp86x-elf.h,v
retrieving revision 1.16
diff -u -r1.16 sp86x-elf.h
--- config/sparc/sp86x-elf.h	24 Dec 2003 00:14:25 -0000	1.16
+++ config/sparc/sp86x-elf.h	21 Jan 2005 08:41:06 -0000
@@ -27,13 +27,6 @@
     }						\
   while (0)
 
-/* Default to dwarf2 in ELF.  */
-
-#define DWARF2_DEBUGGING_INFO 1
-
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparclite 86x)");
 
Index: config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.272
diff -u -r1.272 sparc.h
--- config/sparc/sparc.h	18 Jan 2005 12:01:49 -0000	1.272
+++ config/sparc/sparc.h	21 Jan 2005 08:41:08 -0000
@@ -481,10 +481,6 @@
 #define CAN_DEBUG_WITHOUT_FP
 
 #define OVERRIDE_OPTIONS  sparc_override_options ()
-
-/* Generate DBX debugging information.  */
-
-#define DBX_DEBUGGING_INFO 1
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]