configure.ac: Test for assembler tolerance to # 0 "".

* configure.ac: Test for assembler tolerance to # 0 "".
* configure, config.in: Rebuilt.
* final.c (final_scan_insn): Emit it if HAVE_AS_LINE_ZERO.

From-SVN: r122879
This commit is contained in:
Alexandre Oliva 2007-03-13 07:19:14 +00:00 committed by Alexandre Oliva
parent 98312a9bed
commit 03943c05c1
5 changed files with 81 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-03-13 Alexandre Oliva <aoliva@redhat.com>
* configure.ac: Test for assembler tolerance to # 0 "".
* configure, config.in: Rebuilt.
* final.c (final_scan_insn): Emit it if HAVE_AS_LINE_ZERO.
2007-03-13 Geoffrey Keating <geoffk@apple.com>
* doc/invoke.texi (Spec Files): Update for '%{,' spec.

View File

@ -240,6 +240,12 @@
#endif
/* Define if the assembler won't complain about a line such as # 0 "" 2. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_LINE_ZERO
#endif
/* Define if your assembler supports ltoffx and ldxmov relocations. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_LTOFFX_LDXMOV_RELOCS

40
gcc/configure vendored
View File

@ -16005,6 +16005,46 @@ _ACEOF
fi
fi
echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
if test "${gcc_cv_as_line_zero+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
gcc_cv_as_line_zero=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( elf,2,16,91 \* 1000 \) + gcc_cv_as_line_zero=yes \) \* 1000 + `
then :
fi
elif test "x$gcc_cv_as" != x; then
{ echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
test "x`cat conftest.out`" = x
then
gcc_cv_as_line_zero=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
echo "configure: error output was" >&5
cat conftest.out >&5
fi
rm -f conftest.o conftest.s conftest.out
fi
fi
echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
if test "x$gcc_cv_as_line_zero" = xyes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_LINE_ZERO 1
_ACEOF
fi
echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
gcc_cv_ld_ro_rw_mix=unknown

View File

@ -3069,6 +3069,30 @@ if test x"$insn" != x; then
[Define if your assembler supports the --gstabs option.])])
fi
AC_CACHE_CHECK([assembler for tolerance to line number 0],
[gcc_cv_as_line_zero],
[gcc_cv_as_line_zero=no
if test $in_tree_gas = yes; then
gcc_GAS_VERSION_GTE_IFELSE([elf,2,16,91], [gcc_cv_as_line_zero=yes])
elif test "x$gcc_cv_as" != x; then
{ echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
if AC_TRY_COMMAND([$gcc_cv_as -o conftest.o conftest.s >&AS_MESSAGE_LOG_FD 2>conftest.out]) &&
test "x`cat conftest.out`" = x
then
gcc_cv_as_line_zero=yes
else
echo "configure: failed program was" >&AS_MESSAGE_LOG_FD
cat conftest.s >&AS_MESSAGE_LOG_FD
echo "configure: error output was" >&AS_MESSAGE_LOG_FD
cat conftest.out >&AS_MESSAGE_LOG_FD
fi
rm -f conftest.o conftest.s conftest.out
fi])
if test "x$gcc_cv_as_line_zero" = xyes; then
AC_DEFINE([HAVE_AS_LINE_ZERO], 1,
[Define if the assembler won't complain about a line such as # 0 "" 2.])
fi
AC_MSG_CHECKING(linker read-only and read-write section mixing)
gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then

View File

@ -2085,8 +2085,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
fprintf (asm_out_file, "%s %i \"%s\" 1\n",
ASM_COMMENT_START, loc.line, loc.file);
fprintf (asm_out_file, "\t%s\n", string);
if (loc.file && loc.line)
#if HAVE_AS_LINE_ZERO
if (*loc.file && loc.line)
fprintf (asm_out_file, "%s 0 \"\" 2\n", ASM_COMMENT_START);
#endif
}
break;
}
@ -2124,8 +2126,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
fprintf (asm_out_file, "%s %i \"%s\" 1\n",
ASM_COMMENT_START, loc.line, loc.file);
output_asm_insn (string, ops);
#if HAVE_AS_LINE_ZERO
if (loc.file && loc.line)
fprintf (asm_out_file, "%s 0 \"\" 2\n", ASM_COMMENT_START);
#endif
}
this_is_asm_operands = 0;