Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 3d7538459..bb6e8d7b2 100644
--- a/configure.in
+++ b/configure.in
@@ -1760,6 +1760,36 @@ for module in ${target_configdirs} ; do
/^@if target-$module\$/d
/^@endif target-$module\$/d"
done
+
+AC_ARG_ENABLE([bootstrap],
+[ --enable-bootstrap Enable bootstrapping [no]],,
+enable_bootstrap=no)
+if test -d ${srcdir}/gcc; then
+ case "$host:$target:$enable_bootstrap" in
+ $build:$build:yes | *:no) ;;
+ *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
+ *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
+ esac
+else
+ if test $enable_bootstrap = yes; then
+ AC_MSG_ERROR([cannot bootstrap without a compiler])
+ fi
+fi
+
+case "$enable_bootstrap" in
+ yes)
+ default_target=new-bootstrap
+ extrasub="$extrasub
+/^@if gcc-bootstrap\$/d
+/^@endif gcc-bootstrap\$/d" ;;
+ no)
+ default_target=all
+ extrasub="$extrasub
+/^@if gcc-no-bootstrap\$/d
+/^@endif gcc-no-bootstrap\$/d" ;;
+esac
+AC_SUBST(default_target)
+
extrasub="$extrasub
/^@if /,/^@endif /d"