diff --git a/bootstrap b/bootstrap
index 8992c0302d7ab85b1dc1ba44fa4b982afb301a17..a0a85673afb1f869c633f36fb5608210d5396f60 100755
--- a/bootstrap
+++ b/bootstrap
@@ -27,6 +27,8 @@ CMAKE_SOURCES="\
   cmVariableWatch \
   cmSourceGroup"
 
+cmake_system=`uname`
+
 cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
 cmake_source_dir=`(cd "${cmake_source_dir}";pwd)`
 cmake_binary_dir=`pwd`
@@ -66,6 +68,7 @@ if [ -n "${cmake_verbose}" ]; then
   echo "Source directory: ${cmake_source_dir}"
   echo "Binary directory: ${cmake_binary_dir}"
   echo "Prefix directory: ${cmake_prefix_dir}"
+  echo "System:           ${cmake_system}"
 fi
 
 echo "---------------------------------------------"
@@ -257,6 +260,30 @@ rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
 echo "Make processor on this system is: ${cmake_make_processor}"
 
 # Test C++ compiler features
+
+if [ "x${cmake_system}" = "xIRIX64" ]; then
+  TMPFILE=`cmake_tmp_file`
+  cat>${TMPFILE}.cxx<<EOF
+  #include <iostream>
+  int main() { std::cout << "No need for -LANG:std" << std::endl; return 0;}
+EOF
+  cmake_need_lang_std=0
+  if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+    :
+  else
+    if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} -LANG:std" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+      cmake_need_lang_std=1
+    fi
+  fi
+  if [ "x${cmake_need_lang_std}" = "x1" ]; then
+    cmake_cxx_flags="${cmake_cxx_flags} -LANG:std"
+    echo "${cmake_cxx_compiler} needs -LANG:std"
+  else
+    echo "${cmake_cxx_compiler} does not need -LANG:std"
+  fi
+  rm -f "${TMPFILE}.cxx"
+fi
+
 if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${cmake_source_dir}/Modules/TestForSTDNamespace.cxx" >> cmake_bootstrap.log 2>&1; then
   cmake_report cmConfigure.h "/* #undef CMAKE_NO_STD_NAMESPACE */"
   echo "${cmake_cxx_compiler} has STD namespace"