+# Disable libatomic on unsupported systems.
+if test -d ${srcdir}/libatomic; then
+ if test x$enable_libatomic = x; then
+ AC_MSG_CHECKING([for libatomic support])
+ if (srcdir=${srcdir}/libatomic; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libatomic"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+# Disable liboffloadmic on unsupported systems.
+if test -d ${srcdir}/liboffloadmic; then
+ if test x$enable_liboffloadmic != xno; then
+ AC_MSG_CHECKING([for liboffloadmic support])
+ if (srcdir=${srcdir}/liboffloadmic; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-liboffloadmic"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+# Disable libitm on unsupported systems.
+if test -d ${srcdir}/libitm; then
+ if test x$enable_libitm = x; then
+ AC_MSG_CHECKING([for libitm support])
+ if (srcdir=${srcdir}/libitm; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libitm"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+# Disable libsanitizer on unsupported systems.
+if test -d ${srcdir}/libsanitizer; then
+ if test x$enable_libsanitizer = x; then
+ AC_MSG_CHECKING([for libsanitizer support])
+ if (srcdir=${srcdir}/libsanitizer; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libsanitizer"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+# Disable libvtv on unsupported systems.
+if test -d ${srcdir}/libvtv; then
+ if test x$enable_libvtv = x; then
+ AC_MSG_CHECKING([for libvtv support])
+ if (srcdir=${srcdir}/libvtv; \
+ . ${srcdir}/configure.tgt; \
+ test "$VTV_SUPPORTED" != "yes")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libvtv"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+ if test x$enable_libhsail_rt = x; then
+ AC_MSG_CHECKING([for libhsail-rt support])
+ if (srcdir=${srcdir}/libhsail-rt; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ unsupported_languages="$unsupported_languages brig"
+ # This implicitly disables also target-libhsail-rt as it won't
+ # get added to the build without BRIG FE.
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+
+# Disable libquadmath for some systems.
+case "${target}" in
+ avr-*-*)
+ noconfigdirs="$noconfigdirs target-libquadmath"
+ ;;
+ # libquadmath is unused on AIX and libquadmath build process use of
+ # LD_LIBRARY_PATH can break AIX bootstrap.
+ powerpc-*-aix* | rs6000-*-aix*)
+ noconfigdirs="$noconfigdirs target-libquadmath"
+ ;;
+esac
+
+# Disable libssp for some systems.
+case "${target}" in
+ avr-*-*)
+ # No hosted I/O support.
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
+ powerpc-*-aix* | rs6000-*-aix*)
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
+ rl78-*-*)
+ # libssp uses a misaligned load to trigger a fault, but the RL78
+ # doesn't fault for those - instead, it gives a build-time error
+ # for explicit misaligned loads.
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
+ visium-*-*)
+ # No hosted I/O support.
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
+esac
+
+# Disable libstdc++-v3 for some systems.
+# Allow user to override this if they pass --enable-libstdc++-v3
+if test "${ENABLE_LIBSTDCXX}" = "default" ; then
+ case "${target}" in
+ *-*-vxworks*)
+ # VxWorks uses the Dinkumware C++ library.
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
+ arm*-wince-pe*)
+ # the C++ libraries don't build on top of CE's C libraries
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
+ avr-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
+ esac
+fi
+
+# Disable Fortran for some systems.
+case "${target}" in
+ mmix-*-*)
+ # See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>.
+ unsupported_languages="$unsupported_languages fortran"
+ ;;
+esac
+
+# Disable libffi for some systems.
+case "${target}" in
+ powerpc-*-darwin*)
+ ;;
+ i[[3456789]]86-*-darwin*)
+ ;;
+ x86_64-*-darwin[[912]]*)
+ ;;
+ *-*-darwin*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-netware*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-phoenix*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-rtems*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-tpf*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-uclinux*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-vxworks*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ aarch64*-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ alpha*-*-*vms*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ arm*-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ arm-wince-pe)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ cris-*-* | crisv32-*-*)
+ case "${target}" in
+ *-*-linux*)
+ ;;
+ *) # See PR46792 regarding target-libffi.
+ noconfigdirs="$noconfigdirs target-libffi";;
+ esac
+ ;;
+ hppa*64*-*-hpux*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ hppa*-hp-hpux11*)
+ ;;
+ hppa*-*-hpux*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ ia64*-*-*vms*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ i[[3456789]]86-w64-mingw*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ i[[3456789]]86-*-mingw*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ x86_64-*-mingw*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ mmix-*-*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ powerpc-*-aix*)
+ ;;
+ rs6000-*-aix*)
+ ;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+ *-*-lynxos*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw*)
+ unsupported_languages="$unsupported_languages go"
+ ;;
+esac
+
+# Disable libgo for some systems where it is known to not work.
+# For testing, you can easily override this with --enable-libgo.
+if test x$enable_libgo = x; then
+ case "${target}" in
+ *-*-darwin*)
+ # PR 46986
+ noconfigdirs="$noconfigdirs target-libgo"
+ ;;
+ *-*-cygwin* | *-*-mingw*)
+ noconfigdirs="$noconfigdirs target-libgo"
+ ;;
+ esac
+fi
+