OSDN Git Service

* configure.ac: Check for .gnu_attribute on Power.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2007 10:46:35 +0000 (10:46 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2007 10:46:35 +0000 (10:46 +0000)
* configure: Regenerate.
* config/rs6000/rs6000.c (rs6000_file_start): If supported, output
attribute for floating-point ABI.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126197 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/configure
gcc/configure.ac

index a269165..036f8f3 100644 (file)
@@ -1,3 +1,10 @@
+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>
 
        PR tree-optimization/32230
index f9bca50..f54a216 100644 (file)
@@ -2205,6 +2205,12 @@ rs6000_file_start (void)
        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))
     {
       switch_to_section (toc_section);
index 68f8ed6..c50bf8c 100755 (executable)
@@ -15759,6 +15759,43 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 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*-*-*)
index 3e0f53a..56a986a 100644 (file)
@@ -2929,6 +2929,12 @@ LCF0:
       [$conftest_s],,
       [AC_DEFINE(HAVE_AS_DFP, 1,
          [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*-*-*)