Commit e51917ae by Joseph Myers Committed by Joseph Myers

configure.ac: Check for .gnu_attribute on Power.

	* configure.ac: Check for .gnu_attribute on Power.
	* configure: Regenerate.
	* config/rs6000/rs6000.c (rs6000_file_start): If supported, output
	attribute for floating-point ABI.

From-SVN: r126197
parent 3053ce44
2007-07-02 Joseph Myers <joseph@codesourcery.com>
* configure.ac: Check for .gnu_attribute on Power.
* configure: Regenerate.
* config/rs6000/rs6000.c (rs6000_file_start): If supported, output
attribute for floating-point ABI.
2007-07-02 Ira Rosen <irar@il.ibm.com> 2007-07-02 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/32230 PR tree-optimization/32230
......
...@@ -2205,6 +2205,12 @@ rs6000_file_start (void) ...@@ -2205,6 +2205,12 @@ rs6000_file_start (void)
putc ('\n', file); putc ('\n', file);
} }
#ifdef HAVE_AS_GNU_ATTRIBUTE
if (TARGET_32BIT && DEFAULT_ABI == ABI_V4)
fprintf (file, "\t.gnu_attribute 4, %d\n",
(TARGET_HARD_FLOAT && TARGET_FPRS) ? 1 : 2);
#endif
if (DEFAULT_ABI == ABI_AIX || (TARGET_ELF && flag_pic == 2)) if (DEFAULT_ABI == ABI_AIX || (TARGET_ELF && flag_pic == 2))
{ {
switch_to_section (toc_section); switch_to_section (toc_section);
......
...@@ -15759,6 +15759,43 @@ cat >>confdefs.h <<\_ACEOF ...@@ -15759,6 +15759,43 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
gcc_cv_as_powerpc_gnu_attribute=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
then gcc_cv_as_powerpc_gnu_attribute=yes
fi
elif test x$gcc_cv_as != x; then
echo '.gnu_attribute 4,1' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
{ (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); }; }
then
gcc_cv_as_powerpc_gnu_attribute=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_GNU_ATTRIBUTE 1
_ACEOF
fi
;; ;;
mips*-*-*) mips*-*-*)
......
...@@ -2929,6 +2929,12 @@ LCF0: ...@@ -2929,6 +2929,12 @@ LCF0:
[$conftest_s],, [$conftest_s],,
[AC_DEFINE(HAVE_AS_DFP, 1, [AC_DEFINE(HAVE_AS_DFP, 1,
[Define if your assembler supports DFP instructions.])]) [Define if your assembler supports DFP instructions.])])
gcc_GAS_CHECK_FEATURE([.gnu_attribute support],
gcc_cv_as_powerpc_gnu_attribute, [2,18,0],,
[.gnu_attribute 4,1],,
[AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1,
[Define if your assembler supports .gnu_attribute.])])
;; ;;
mips*-*-*) 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