]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: Check for .gnu_attribute on Power.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 2 Jul 2007 10:46:35 +0000 (11:46 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 2 Jul 2007 10:46:35 +0000 (11:46 +0100)
* 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

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

index a2691656661797da63253bb3d1037145f4cf0cdd..036f8f373bd64f895c0992bbcd5f24b84a1fc6c5 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 f9bca5002a64551c6e7aefccb0df3ebca84736eb..f54a216c0eea7f18d65aa1166ea3055ed44dfaa5 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 68f8ed6e425c1a4ddf83fd0834675aef789ce880..c50bf8ccb002554bee2826de5952a1fcfd1c7d71 100755 (executable)
@@ -15758,6 +15758,43 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_AS_DFP 1
 _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
     ;;
 
index 3e0f53adbec0821163c0afe2634d2d5c089dda0e..56a986a9f90dfa584a7ad08d2df464189354dd02 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*-*-*)