summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-24 06:17:07 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-24 06:17:07 +0000
commit7d6171f260fff5ad36db704c46d93166ab123b25 (patch)
tree158cf50046eaac97425a94833a0a484ea974467a
parent86ce8bf83ad6e2d2a3dcc7ca9b143b421a6ed562 (diff)
downloadgcc-7d6171f260fff5ad36db704c46d93166ab123b25.tar.gz
* config.gcc (sparc64-*-solaris2*): Include sparc/sol2-gas.h
if the GNU assembler is used. (sparc-*-solaris2*): Likewise. * dbxout.c (NO_DBX_BNSYM_ENSYM): Default to zero. (dbxout_function_end): Protect N_ENSYM with it. (dbxout_begin_prologue): Protect N_BNSYM with it. * doc/tm.texi (NO_DBX_BNSYM_ENSYM): Document it. * config/sparc/sol2.h (NO_DBX_BNSYM_ENSYM): Define to 1. * config/sparc/sol2-gas.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88013 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config.gcc5
-rw-r--r--gcc/config/sparc/sol2-gas.h5
-rw-r--r--gcc/config/sparc/sol2.h3
-rw-r--r--gcc/dbxout.c7
-rw-r--r--gcc/doc/tm.texi6
6 files changed, 36 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8395979acd2..dce454e42f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2004-09-24 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * config.gcc (sparc64-*-solaris2*): Include sparc/sol2-gas.h
+ if the GNU assembler is used.
+ (sparc-*-solaris2*): Likewise.
+ * dbxout.c (NO_DBX_BNSYM_ENSYM): Default to zero.
+ (dbxout_function_end): Protect N_ENSYM with it.
+ (dbxout_begin_prologue): Protect N_BNSYM with it.
+ * doc/tm.texi (NO_DBX_BNSYM_ENSYM): Document it.
+ * config/sparc/sol2.h (NO_DBX_BNSYM_ENSYM): Define to 1.
+ * config/sparc/sol2-gas.h: New file.
+
2004-09-23 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/17369
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 747bcac9577..0ec389e6ef0 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1869,7 +1869,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
fi
if test x$gas = xyes; then
- tm_file="${tm_file} sparc/sol2-gas-bi.h"
+ tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
fi
tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
if test x$gnu_ld = xyes; then
@@ -1894,6 +1894,9 @@ sparc-*-solaris2*)
if test x$gnu_ld = xyes; then
tm_file="${tm_file} sparc/sol2-gld.h"
fi
+ if test x$gas = xyes; then
+ tm_file="${tm_file} sparc/sol2-gas.h"
+ fi
tmake_file="t-sol2 sparc/t-sol2 sparc/t-crtfm"
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file t-slibgcc-elf-ver"
diff --git a/gcc/config/sparc/sol2-gas.h b/gcc/config/sparc/sol2-gas.h
new file mode 100644
index 00000000000..7e808f7acaf
--- /dev/null
+++ b/gcc/config/sparc/sol2-gas.h
@@ -0,0 +1,5 @@
+/* Definitions of target machine for GCC, for SPARC running Solaris 2
+ using the GNU assembler. */
+
+/* Undefine this so that BNSYM/ENSYM pairs are emitted by STABS+. */
+#undef NO_DBX_BNSYM_ENSYM
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index a218ccdceae..8b5edb070c9 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -108,6 +108,9 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
+/* The Solaris assembler cannot grok .stabd directives. */
+#undef NO_DBX_BNSYM_ENSYM
+#define NO_DBX_BNSYM_ENSYM 1
#undef ENDFILE_SPEC
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 22eaf27dfb7..8dd153e151a 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -150,6 +150,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define NO_DBX_FUNCTION_END 0
#endif
+#ifndef NO_DBX_BNSYM_ENSYM
+#define NO_DBX_BNSYM_ENSYM 0
+#endif
+
enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
/* Structure recording information about a C data type.
@@ -487,7 +491,7 @@ dbxout_function_end (void)
fprintf (asmfile, "\n");
#endif
- if (!flag_debug_only_used_symbols)
+ if (!NO_DBX_BNSYM_ENSYM && !flag_debug_only_used_symbols)
fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_ENSYM);
}
#endif /* DBX_DEBUGGING_INFO */
@@ -794,6 +798,7 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
{
if (use_gnu_debug_info_extensions
&& !NO_DBX_FUNCTION_END
+ && !NO_DBX_BNSYM_ENSYM
&& !flag_debug_only_used_symbols)
fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 5d777c48229..fc033ecc691 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7998,6 +7998,12 @@ On those machines, define this macro to turn this feature off without
disturbing the rest of the gdb extensions.
@end defmac
+@defmac NO_DBX_BNSYM_ENSYM
+Some assemblers cannot handle the @code{.stabd BNSYM/ENSYM,0,0} gdb dbx
+extension construct. On those machines, define this macro to turn this
+feature off without disturbing the rest of the gdb extensions.
+@end defmac
+
@node File Names and DBX
@subsection File Names in DBX Format