OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Jan 2010 12:14:09 +0000 (12:14 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Jan 2010 12:14:09 +0000 (12:14 +0000)
* 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.

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

gcc/ChangeLog
gcc/collect2.c
gcc/config.in
gcc/config/rs6000/aix.h
gcc/configure
gcc/configure.ac

index 85e0dae..7d3889e 100644 (file)
@@ -1,3 +1,13 @@
+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.
index 777510b..914015f 100644 (file)
@@ -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);
index 1686be9..a3744f9 100644 (file)
 #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
index 4676110..380b0b8 100644 (file)
    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
index c150ee0..d6c8dc4 100755 (executable)
@@ -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*-*-*)
index e5d9baf..6247d32 100644 (file)
@@ -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*-*-*)