2000-11-17 Richard Henderson <rth@redhat.com>
+ * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): New. Detect
+ whether as accepts .file/.loc and produces dwarf2 line info.
+ * dwarf2out.c (DWARF2_ASM_LINE_DEBUG_INFO): Default on if
+ the assembler supports it.
+ * config.in, configure: Regenerate.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
* fixinc/mkfixinc.sh: Don't disable fixincludes for any linux*.
2000-11-17 Jim Wilson <wilson@redhat.com>
/* Define if your assembler supports offsetable %lo(). */
#undef HAVE_AS_OFFSETABLE_LO10
+/* Define if your assembler supports dwarf2 .file/.loc directives. */
+#undef HAVE_AS_DWARF2_DEBUG_LINE
+
/* Define if you want to always select the new-abi for g++. */
#undef ENABLE_NEW_GXX_ABI
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:5854: checking assembler alignment features" >&5
-gcc_cv_as_alignment_features=
+gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
# bytes to skip when using .p2align.
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:5902: checking assembler subsection support" >&5
-gcc_cv_as_subsections=
+gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_subsections="working .subsection -1"
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:5942: checking assembler weak support" >&5
-gcc_cv_as_weak=
+gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
gcc_cv_as_weak="yes"
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:5965: checking assembler hidden support" >&5
-gcc_cv_as_hidden=
+gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_hidden="yes"
;;
esac
+echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
+echo "configure:6162: checking assembler dwarf2 debug_line support" >&5
+gcc_cv_as_dwarf2_debug_line=no
+# ??? Not all targets support dwarf2 debug_line, even within a version
+# of gas. Moreover, we need to emit a valid instruction to trigger any
+# info to the output file. So, as supported targets are added to gas 2.11,
+# add some instruction here to (also) show we expect this might work.
+# ??? Once 2.11 is released, probably need to add first known working
+# version to the per-target configury.
+case "$target" in
+ i?86*-*-* | mips*-*-* | alpha*-*-*)
+ insn="nop"
+ ;;
+ ia64*-*-*)
+ insn="nop 0"
+ ;;
+ esac
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
+then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 11 \
+ -o "$gcc_cv_gas_major_version" -gt 2 \
+ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+ && test x"$insn" != x ; then
+ gcc_cv_as_dwarf2_debug_line="yes"
+ fi
+elif test x$gcc_cv_as != x -a x"$insn" != x ; then
+ echo ' .file 0 "conftest.s"' > conftest.s
+ echo ' .loc 0 3 0' >> conftest.s
+ echo " $insn" >> conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+ && grep debug_line conftest.o > /dev/null 2>&1 ; then
+ gcc_cv_as_dwarf2_debug_line="yes"
+ fi
+ rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_AS_DWARF2_DEBUG_LINE 1
+EOF
+
+fi
+echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:6289: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:6333: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
# Figure out what assembler alignment features are present.
AC_MSG_CHECKING(assembler alignment features)
-gcc_cv_as_alignment_features=
+gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
# bytes to skip when using .p2align.
AC_MSG_RESULT($gcc_cv_as_alignment_features)
AC_MSG_CHECKING(assembler subsection support)
-gcc_cv_as_subsections=
+gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_subsections="working .subsection -1"
AC_MSG_RESULT($gcc_cv_as_subsections)
AC_MSG_CHECKING(assembler weak support)
-gcc_cv_as_weak=
+gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
gcc_cv_as_weak="yes"
AC_MSG_RESULT($gcc_cv_as_weak)
AC_MSG_CHECKING(assembler hidden support)
-gcc_cv_as_hidden=
+gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
gcc_cv_as_hidden="yes"
;;
esac
+AC_MSG_CHECKING(assembler dwarf2 debug_line support)
+gcc_cv_as_dwarf2_debug_line=no
+# ??? Not all targets support dwarf2 debug_line, even within a version
+# of gas. Moreover, we need to emit a valid instruction to trigger any
+# info to the output file. So, as supported targets are added to gas 2.11,
+# add some instruction here to (also) show we expect this might work.
+# ??? Once 2.11 is released, probably need to add first known working
+# version to the per-target configury.
+case "$target" in
+ i?86*-*-* | mips*-*-* | alpha*-*-*)
+ insn="nop"
+ ;;
+ ia64*-*-*)
+ insn="nop 0"
+ ;;
+ esac
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
+then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 11 \
+ -o "$gcc_cv_gas_major_version" -gt 2 \
+ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+ && test x"$insn" != x ; then
+ gcc_cv_as_dwarf2_debug_line="yes"
+ fi
+elif test x$gcc_cv_as != x -a x"$insn" != x ; then
+ echo ' .file 0 "conftest.s"' > conftest.s
+ echo ' .loc 0 3 0' >> conftest.s
+ echo " $insn" >> conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+ && grep debug_line conftest.o > /dev/null 2>&1 ; then
+ gcc_cv_as_dwarf2_debug_line="yes"
+ fi
+ rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
+ AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1,
+ [Define if your assembler supports dwarf2 .file/.loc directives.])
+fi
+AC_MSG_RESULT($gcc_cv_as_dwarf2_debug_line)
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
(DWARF_ROUND (2 * DWARF_OFFSET_SIZE + 4, DWARF2_ADDR_SIZE * 2) \
- (2 * DWARF_OFFSET_SIZE + 4))
-/* The default is to have gcc emit the line number tables. */
+/* Use assembler line directives if available. */
#ifndef DWARF2_ASM_LINE_DEBUG_INFO
+#ifdef HAVE_AS_DWARF2_DEBUG_LINE
+#define DWARF2_ASM_LINE_DEBUG_INFO 1
+#else
#define DWARF2_ASM_LINE_DEBUG_INFO 0
#endif
+#endif
/* Define the architecture-dependent minimum instruction length (in bytes).
In this implementation of DWARF, this field is used for information