This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
sparc64 and DWARF2
- From: Andrew Macleod <amacleod at cygnus dot com>
- To: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jan 2002 10:05:00 -0800
- Subject: sparc64 and DWARF2
Can we make DWARF2 the default debugging format for sparc64 on
solaris 2.7+ ?
>From solaris 2.7 onward, the system linker has supported DWARF2.
I've added a sol27-sld-64.h file which removes the
LINKER_DOES_NOT_WORK_WITH_DWARF2 definition.
Not long ago, we didn't support 64 bit stabs very well in gdb, and to the
best of my knowledge, this hasn't changed. I've added a sol27-64.h file
which makes DWARF2 the default debugging format if we are using GNU ld.
It could be done in sol27-sld-64.h instead, but this seems slightly
cleaner/more consistant to me. There are a half dozen different
ways to do this, any are fine with me.
Is it OK to do this on mainline, or are there reasons we don't want to
do it? We should at least remove the LINKER_DOESN_NOT.. definition
for 2.7 onward.
Andrew
PS its built and bootstrapping now.
Index: gcc/config/sparc/sol27-64.h
===================================================================
/* Definitions of target machine for GNU compiler, for 64-bit SPARC
running Solaris 2 using the GNU linker. */
/* From solaris 2.7 onward, make DWARF2 the default debugging format with the
gnu linker. */
#include "sol2-64.h"
#ifdef PREFERRED_DEBUGGING_TYPE
#undef PREFERRED_DEBUGGING_TYPE
#endif
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
Index: gcc/config/sparc/sol27-sld-64.h
===================================================================
/* Definitions of target machine for GNU compiler, for 64-bit SPARC
running Solaris 2.7 and later using the system linker. */
#include "sparc/sol2-sld-64.h"
/* The system linker does work with DWARF2 from 2.7 on. */
#ifdef LINKER_DOES_NOT_WORK_WITH_DWARF2
#undef LINKER_DOES_NOT_WORK_WITH_DWARF2
#endif
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.154
diff -c -p -r1.154 config.gcc
*** config.gcc 2002/01/27 04:17:59 1.154
--- config.gcc 2002/01/29 00:05:47
*************** sparc-*-rtems*|sparc-*-rtemself*)
*** 2995,3006 ****
fi
;;
sparcv9-*-solaris2* | sparc64-*-solaris2*)
! if test x$gnu_ld = xyes
! then
! tm_file="sparc/sol2-sld-64.h sparc/sol2-64.h"
! else
! tm_file=sparc/sol2-sld-64.h
! fi
xm_defines=POSIX
tmake_file="sparc/t-sol2 sparc/t-sol2-64"
if test x$gnu_ld = xyes; then
--- 2995,3018 ----
fi
;;
sparcv9-*-solaris2* | sparc64-*-solaris2*)
! case $machine in
! *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
! if test x$gnu_ld = xyes
! then
! tm_file="sparc/sol2-sld-64.h sparc/sol2-64.h"
! else
! tm_file=sparc/sol2-sld-64.h
! fi
! ;;
! *)
! if test x$gnu_ld = xyes
! then
! tm_file="sparc/sol27-sld-64.h sparc/sol27-64.h"
! else
! tm_file=sparc/sol27-sld-64.h
! fi
! ;;
! esac
xm_defines=POSIX
tmake_file="sparc/t-sol2 sparc/t-sol2-64"
if test x$gnu_ld = xyes; then
*************** sparc-*-solaris2*)
*** 3064,3072 ****
*-*-solaris2*)
if test x$gnu_ld = xyes
then
! tm_file="sparc/sol2-sld-64.h sparc/sol2-64.h"
else
! tm_file="sparc/sol2-sld-64.h"
fi
tmake_file="$tmake_file sparc/t-sol2-64"
;;
--- 3076,3084 ----
*-*-solaris2*)
if test x$gnu_ld = xyes
then
! tm_file="sparc/sol27-sld-64.h sparc/sol27-64.h"
else
! tm_file="sparc/sol27-sld-64.h"
fi
tmake_file="$tmake_file sparc/t-sol2-64"
;;