OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libitm / configure.tgt
index efc01e0..b68c86b 100644 (file)
@@ -1,5 +1,5 @@
 # -*- shell-script -*-
-#   Copyright (C) 2011 Free Software Foundation, Inc.
+#   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 #  XLDFLAGS            Add extra link flags to use.
 
 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
-if test $gcc_cv_have_tls = yes ; then
+if test "$gcc_cv_have_tls" = yes ; then
   case "${target}" in
 
     # For x86, we use slots in the TCB head for most of our TLS.
@@ -46,13 +46,12 @@ fi
 # Map the target cpu to an ARCH sub-directory.  At the same time,
 # work out any special compilation flags as necessary.
 case "${target_cpu}" in
-  alpha*)      ARCH=alpha ;;
-  ia64*)       ARCH=ia64 ;;
-  mips*)       ARCH=mips ;;
-  powerpc*)    ARCH=powerpc ;;
-  s390*)       ARCH=s390 ;;
+  alpha*)              ARCH=alpha ;;
+  rs6000 | powerpc*)   ARCH=powerpc ;;
 
-  i[456]86)
+  arm*)                ARCH=arm ;;
+
+  i[3456]86)
        case " ${CC} ${CFLAGS} " in
          *" -m64 "*)
            ;;
@@ -65,6 +64,36 @@ case "${target_cpu}" in
        ARCH=x86
        ;;
 
+  sh*)         ARCH=sh ;;
+
+  sparc)
+       case " ${CC} ${CFLAGS} " in
+         *" -m64 "*)
+           ;;
+         *)
+           if test -z "$with_cpu"; then
+             XCFLAGS="${XCFLAGS} -mcpu=v9"
+           fi
+       esac
+       ARCH=sparc
+       ;;
+
+  sparc64|sparcv9)
+       case " ${CC} ${CFLAGS} " in
+         *" -m32 "*)
+           XCFLAGS="${XCFLAGS} -mcpu=v9"
+           ;;
+         *" -m64 "*)
+           ;;
+         *)
+           if test "x$with_cpu" = xv8; then
+             XCFLAGS="${XCFLAGS} -mcpu=v9"
+           fi
+           ;;
+       esac
+       ARCH=sparc
+       ;;
+
   x86_64)
        case " ${CC} ${CFLAGS} " in
          *" -m32 "*)
@@ -75,57 +104,38 @@ case "${target_cpu}" in
        ARCH=x86
        ;;
 
-  sparcv9 | sparc64)
-       # Note that sparcv7 and sparcv8 is not included here.  We need cas.
-       echo "int i;" > conftestx.c
-       if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
-         case "`/usr/bin/file conftestx.o`" in
-           *32-bit*)
-             case " ${CC} ${CFLAGS}" in
-               *" -mcpu=ultrasparc"*)
-                 ;;
-               *)
-                 XCFLAGS="${XCFLAGS} -mcpu=v9"
-                 ;;
-             esac
-             ;;
-         esac
-       fi
-       rm -f conftestx.c conftestx.o
-       ARCH=sparc
-       ;;
-
   *)
        ARCH="${target_cpu}"
        ;;
 esac
-  
+
+# For the benefit of top-level configure, determine if the cpu is supported.
+test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
+
 # Since we require POSIX threads, assume a POSIX system by default.
 config_path="$ARCH posix generic"
 
 # Other system configury
 case "${target}" in
   *-*-linux*)
-       if test $enable_linux_futex = yes; then
+       if test "$enable_linux_futex" = yes; then
          config_path="linux/$ARCH linux $config_path"
        fi
        ;;
 
-  *-*-hpux11*)
-       # HPUX v11.x requires -lrt to resolve sem_init in libgomp.la
-       XLDFLAGS="${XLDFLAGS} -lrt"
-       ;;
-
-  *-*-mingw32*)
-       config_path="$ARCH mingw32 posix generic"
+  powerpc*-*-aix* | rs6000-*-aix*)
+       # The system ought to be supported, but sjlj.S has not been ported.
+       UNSUPPORTED=1
        ;;
 
-  *-*-solaris2.[56]*)
-       config_path="$ARCH posix95 posix generic"
-       XLDFLAGS="${XLDFLAGS} -lposix4"
+  *-*-gnu* | *-*-k*bsd*-gnu \
+  | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
+  | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
+  | *-*-darwin* | *-*-aix*)
+       # POSIX system.  The OS is supported.
        ;;
 
-  *-*-darwin*)
-       config_path="$ARCH bsd posix generic"
+  *)   # Non-POSIX, or embedded system
+       UNSUPPORTED=1
        ;;
 esac