Commit 636cf8b1 by Richard Sandiford Committed by Richard Sandiford

configure.ac (HAVE_AS_REF): New C macro.

gcc/
	* configure.ac (HAVE_AS_REF): New C macro.
	* configure: Regenerate.
	* config.in: Likewise.
	* collect2.c (main): Only postpone SCAN_DWEH to the second pass
	if HAVE_AS_REF.
	* config/rs6000/aix.h (ASM_OUTPUT_DWARF_TABLE_REF): Only define
	if HAVE_AS_REF.

From-SVN: r155961
parent 7647c841
2010-01-16 Richard Sandiford <r.sandiford@uk.ibm.com>
* configure.ac (HAVE_AS_REF): New C macro.
* configure: Regenerate.
* config.in: Likewise.
* collect2.c (main): Only postpone SCAN_DWEH to the second pass
if HAVE_AS_REF.
* config/rs6000/aix.h (ASM_OUTPUT_DWARF_TABLE_REF): Only define
if HAVE_AS_REF.
2010-01-16 Joern Rennecke <amylaar@spamcop.net>
* doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Fix argument types.
......
......@@ -1677,8 +1677,11 @@ main (int argc, char **argv)
control whether we need a first pass link later on or not, and what
will remain to be scanned there. */
scanfilter this_filter
= shared_obj ? ld1_filter : (ld1_filter & ~SCAN_DWEH);
scanfilter this_filter = ld1_filter;
#if HAVE_AS_REF
if (!shared_obj)
this_filter &= ~SCAN_DWEH;
#endif
while (export_object_lst < object)
scan_prog_file (*export_object_lst++, PASS_OBJ, this_filter);
......
......@@ -393,6 +393,12 @@
#endif
/* Define if your assembler supports .ref */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_REF
#endif
/* Define if your assembler supports .register. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_REGISTER_PSEUDO_OP
......
......@@ -43,11 +43,13 @@
collect has a chance to see them, so scan the object files directly. */
#define COLLECT_EXPORT_LIST
#if HAVE_AS_REF
/* Issue assembly directives that create a reference to the given DWARF table
identifier label from the current function section. This is defined to
ensure we drag frame frame tables associated with needed function bodies in
a link with garbage collection activated. */
#define ASM_OUTPUT_DWARF_TABLE_REF rs6000_aix_asm_output_dwarf_table_ref
#endif
/* Handle #pragma weak and #pragma pack. */
#define HANDLE_SYSV_PRAGMA 1
......
......@@ -23630,6 +23630,50 @@ if test $gcc_cv_as_powerpc_tls_markers = yes; then
$as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
fi
case $target in
*-*-aix*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
$as_echo_n "checking assembler for .ref support... " >&6; }
if test "${gcc_cv_as_aix_ref+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_as_aix_ref=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2.21.0 \* 1000 \) + gcc_cv_as_aix_ref=yes \) \* 1000 + `
then :
fi
elif test x$gcc_cv_as != x; then
echo ' .csect stuff[rw]
stuff:
.long 1
.extern sym
.ref sym
' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
gcc_cv_as_aix_ref=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aix_ref" >&5
$as_echo "$gcc_cv_as_aix_ref" >&6; }
if test $gcc_cv_as_aix_ref = yes; then
$as_echo "#define HAVE_AS_REF 1" >>confdefs.h
fi
;;
esac
;;
mips*-*-*)
......
......@@ -3326,6 +3326,21 @@ LCF0:
[ bl __tls_get_addr(x@tlsgd)],,
[AC_DEFINE(HAVE_AS_TLS_MARKERS, 1,
[Define if your assembler supports arg info for __tls_get_addr.])])
case $target in
*-*-aix*)
gcc_GAS_CHECK_FEATURE([.ref support],
gcc_cv_as_aix_ref, [2.21.0],,
[ .csect stuff[[rw]]
stuff:
.long 1
.extern sym
.ref sym
],,
[AC_DEFINE(HAVE_AS_REF, 1,
[Define if your assembler supports .ref])])
;;
esac
;;
mips*-*-*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment