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]

Re: SPARC config files cleanup 2/n


Eric Botcazou wrote:
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).

There are a couple of missing undef's which need to be added to avoid warnings lots of warnings when build. The patch for those is below my signature.

The build finally fails here:

gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include ../../gcc/gcc/tree-inline.c -o tree-inline.o
../../gcc/gcc/config/sparc/sparc.c:504: error: 'solaris_insert_attributes' undeclared here (not in a function)


How do we get around this?


sparc/liteelf.h twiddles some defines that are not twiddled in the rtemself.h file. Should we be setting any of those?

  - TARGET_VERSION - ok without setting I think
  - TARGET_DEFAULT - I don't know if we should match
  - US_SOFTWARE_GOFAST - we don't use the GOFAST software we are OK
  - STARTFILE_SPEC - We also use crti/begin, do we need this also
  - undef of INIT_SECTION_ASM_OP and FINI_SECTION_ASM_OP is not
    needed for RTEMS.  We use init/fini.



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.

RTEMS is an easy one. Switch to the best format and let us know which gdb version matches it. We have to compile everthing from ground up with each gcc version so don't worry about binary issues.

--joel

2005-01-21 Joel Sherrill <joel@oarcorp.com>

	* config/sparc/rtemself.h: Undef TARGET_SUB_OS_CPP_BUILTINS
	to avoid warnings.
	* config/rtems.h: Undef NO_IMPLICIT_EXTERN_C to avoid
	warnings.

Index: gcc/config/sparc/rtemself.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/rtemself.h,v
retrieving revision 1.12
diff -u -r1.12 rtemself.h
--- gcc/config/sparc/rtemself.h	3 Jan 2005 21:00:24 -0000	1.12
+++ gcc/config/sparc/rtemself.h	21 Jan 2005 14:13:04 -0000
@@ -20,6 +20,7 @@
 Boston, MA 02111-1307, USA.  */

 /* Target OS builtins.  */
+#undef TARGET_SUB_OS_CPP_BUILTINS
 #define TARGET_SUB_OS_CPP_BUILTINS()		\
   do						\
     {						\
Index: gcc/config/rtems.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rtems.h,v
retrieving revision 1.6
diff -u -r1.6 rtems.h
--- gcc/config/rtems.h	5 Jul 2004 19:49:14 -0000	1.6
+++ gcc/config/rtems.h	21 Jan 2005 14:13:04 -0000
@@ -19,6 +19,7 @@
 Boston, MA 02111-1307, USA.  */

 /* The system headers under RTEMS are C++-aware.  */
+#undef NO_IMPLICIT_EXTERN_C
 #define NO_IMPLICIT_EXTERN_C

/*




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