]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/configure.ac
PR target/14548
[thirdparty/gcc.git] / gcc / configure.ac
index f35812d42f21ea8e73b2582f16aae6a4e1066a6f..742432b539072173723e4cdc0e44ece4e3979e56 100644 (file)
@@ -1656,6 +1656,13 @@ for file in ${extra_headers} ; do
   extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
 done
 
+# Define collect2 in Makefile.
+case $host_can_use_collect2 in
+  no) collect2= ;;
+  *) collect2='collect2$(exeext)' ;;
+esac
+AC_SUBST([collect2])
+
 # Add a definition of USE_COLLECT2 if system wants one.
 case $use_collect2 in
   no) use_collect2= ;;
@@ -1663,6 +1670,11 @@ case $use_collect2 in
   *) 
     host_xm_defines="${host_xm_defines} USE_COLLECT2"
     xm_defines="${xm_defines} USE_COLLECT2"
+    case $host_can_use_collect2 in
+      no)
+        AC_MSG_ERROR([collect2 is required but cannot be built on this system])
+        ;;
+    esac
     ;;
 esac