OSDN Git Service

* toplev.c (rest_of_compilation): Avoid cfg_cleanup calls when not
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index 980d742..fd9df77 100644 (file)
@@ -490,12 +490,29 @@ AC_ARG_WITH(sysroot,
 [  --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.],
 [
  case ${with_sysroot} in
- yes) TARGET_SYSTEM_ROOT='${gcc_tooldir}/sys-root' ;;
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
  esac
    
  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
  CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
+
+ if test "x$exec_prefix" = xNONE; then
+  if test "x$prefix" = xNONE; then
+   test_prefix=/usr/local
+  else
+   test_prefix=$prefix
+  fi
+ else
+  test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+   t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+   TARGET_SYSTEM_ROOT_DEFINE="$t"
+   ;;
+ esac
 ], [
  TARGET_SYSTEM_ROOT=
  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
@@ -956,6 +973,7 @@ else
                echo "  $srcdir/config/$f"
        done
 fi
+echo "Using ${out_host_hook_obj} for host machine hooks."
 
 if test "$host_xm_file" != "$build_xm_file"; then
        count=a
@@ -1944,6 +1962,41 @@ foo:     data8   25
        tls_first_major=2
        tls_first_minor=13
        ;;
+  s390-*-*)
+    conftest_s='
+       .section ".tdata","awT",@progbits
+foo:   .long   25
+       .text
+       .long   foo@TLSGD
+       .long   foo@TLSLDM
+       .long   foo@DTPOFF
+       .long   foo@NTPOFF
+       .long   foo@GOTNTPOFF
+       .long   foo@INDNTPOFF
+       l       %r1,foo@GOTNTPOFF(%r12)
+       l       %r1,0(%r1):tls_load:foo
+       bas     %r14,0(%r1,%r13):tls_gdcall:foo
+       bas     %r14,0(%r1,%r13):tls_ldcall:foo'
+       tls_first_major=2
+       tls_first_minor=14
+       ;;
+  s390x-*-*)
+    conftest_s='
+       .section ".tdata","awT",@progbits
+foo:   .long   25
+       .text
+       .quad   foo@TLSGD
+       .quad   foo@TLSLDM
+       .quad   foo@DTPOFF
+       .quad   foo@NTPOFF
+       .quad   foo@GOTNTPOFF
+       lg      %r1,foo@GOTNTPOFF(%r12)
+       larl    %r1,foo@INDNTPOFF
+       brasl   %r14,__tls_get_offset@PLT:tls_gdcall:foo
+       brasl   %r14,__tls_get_offset@PLT:tls_ldcall:foo'
+       tls_first_major=2
+       tls_first_minor=14
+       ;;
 esac
 if test -z "$tls_first_major"; then
   :
@@ -2180,6 +2233,41 @@ EOF
       [Define true if the assembler supports '.long foo@GOTOFF'.])
     AC_MSG_RESULT($gcc_cv_as_gotoff_in_data)
     ;;
+
+  ia64*-*-*)
+    AC_CACHE_CHECK([assembler supports ltoffx and ldxmov],
+       gcc_cv_as_ltoffx_ldxmov_relocs, [
+       gcc_cv_as_ltoffx_ldxmov_relocs=unknown
+       if test x$gcc_cv_gas_major_version != x \
+               -a x$gcc_cv_gas_minor_version != x
+       then
+          if test "$gcc_cv_gas_major_version" -eq 2 \
+                  -a "$gcc_cv_gas_minor_version" -ge 14 \
+                  -o "$gcc_cv_gas_major_version" -gt 2; then
+             gcc_cv_as_ltoffx_ldxmov_relocs=yes
+          fi
+       elif test x$gcc_cv_as != x; then
+           cat > conftest.s << 'EOF'
+changequote(,)dnl
+       .text
+       addl r15 = @ltoffx(x#), gp
+       ;;
+       ld8.mov r16 = [r15], x#
+EOF
+changequote([,])dnl
+           if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_ltoffx_ldxmov_relocs=yes
+           else
+               gcc_cv_as_ltoffx_ldxmov_relocs=no
+           fi
+           rm -f conftest.s conftest.o
+       fi
+    ])
+    if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
+       AC_DEFINE(HAVE_AS_LTOFFX_LDXMOV_RELOCS, 1,
+         [Define if your assembler supports ltoffx and ldxmov relocations.])
+    fi
+    ;;
 esac
 
 AC_MSG_CHECKING(assembler dwarf2 debug_line support)
@@ -2374,7 +2462,8 @@ case "$target" in
     ;;
 esac
 
-if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
+if test x$with_sysroot = x && test x$host = x$target \
+   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
   AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
 fi
 
@@ -2823,6 +2912,7 @@ AC_SUBST(host_extra_gcc_objs)
 AC_SUBST(host_xm_file_list)
 AC_SUBST(host_xm_file)
 AC_SUBST(host_xm_defines)
+AC_SUBST(out_host_hook_obj)
 AC_SUBST(install)
 AC_SUBST(lang_options_files)
 AC_SUBST(lang_specs_files)