X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure.in;h=ba3a9bccf7c64c3d85aee0e07e9033f0a5aeddd6;hb=3d18355fbc28e8d55b97ae05193b4adb27fff250;hp=3f499cf289d0b26a47400615e21e34098b43d91e;hpb=d6f7b8f2bddc60640af73954fff3c8a2b94b05ce;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure.in b/configure.in index 3f499cf289d..ba3a9bccf7c 100644 --- a/configure.in +++ b/configure.in @@ -279,7 +279,7 @@ case "${host}" in ;; i[[3456789]]86-*-mingw32*) # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv" - noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" + noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib" ;; i[[3456789]]86-*-beos*) noconfigdirs="$noconfigdirs tk itcl libgui gdb" @@ -353,7 +353,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd*) ;; - *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*) + *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -615,32 +615,18 @@ case "${target}" in # 'target-newlib' will appear in skipdirs. ;; i[[3456789]]86-*-mingw32*) - target_configdirs="$target_configdirs target-mingw" - noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}" - - # Can't build gdb for mingw32 if not native. - case "${host}" in - i[[3456789]]86-*-mingw32) ;; # keep gdb tcl tk expect etc. - *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv" - ;; - esac + target_configdirs="$target_configdirs target-winsup" + noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}" ;; *-*-cygwin*) target_configdirs="$target_configdirs target-libtermcap target-winsup" noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}" # always build newlib if winsup directory is present. - if test -d "$srcdir/winsup"; then + if test -d "$srcdir/winsup/cygwin"; then skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` elif test -d "$srcdir/newlib"; then - echo "Warning: winsup is missing so newlib can't be built." + echo "Warning: winsup/cygwin is missing so newlib can't be built." fi - - # Can't build gdb for Cygwin if not native. - case "${host}" in - *-*-cygwin*) ;; # keep gdb tcl tk expect etc. - *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv" - ;; - esac ;; i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \ i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* ) @@ -1219,6 +1205,7 @@ if test -d ${srcdir}/gcc; then language= target_libs= lang_dirs= + subdir_requires= boot_language= build_by_default= need_gmp= @@ -1252,6 +1239,21 @@ if test -d ${srcdir}/gcc; then ;; esac + # Disable languages that need other directories if these aren't available. + for i in $subdir_requires; do + test -f "$srcdir/gcc/$i/config-lang.in" && continue + case ,${enable_languages}, in + *,${language},*) + # Specifically requested language; tell them. + AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing]) + ;; + *) + # Silently disable. + add_this_lang=no + ;; + esac + done + # Disable languages that need GMP if it isn't available. case ,${enable_languages},:${have_gmp}:${need_gmp} in *,${language},*:no:yes) @@ -1324,20 +1326,15 @@ AC_ARG_ENABLE(objc-gc, esac]) # Make sure we only build Boehm's garbage collector if required. -case ,${enable_languages},:${enable_libgcj}:${enable_objc_gc} in - *,objc,*:*:yes) +case ,${enable_languages},:${enable_objc_gc} in + *,objc,*:yes) # Keep target-boehm-gc if requested for Objective-C. ;; - *,java,*:no:*) - # Remove target-boehm-gc if libgcj has been disabled explicitly. - noconfigdirs="$noconfigdirs target-boehm-gc" - ;; - *,java,*:*:*) - # Keep target-boehm-gc by default for Java. - ;; *) - # Otherwise remove target-boehm-gc. - noconfigdirs="$noconfigdirs target-boehm-gc" + # Otherwise remove target-boehm-gc depending on target-libjava. + if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then + noconfigdirs="$noconfigdirs target-boehm-gc" + fi ;; esac @@ -2124,6 +2121,11 @@ case " $target_configdirs " in esac ;; esac +case "$target" in +*-mingw*) + # Can't be handled as Cygwin above since Mingw does not use newlib. + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;; +esac # Allow the user to override the flags for # our build compiler if desired. @@ -2400,6 +2402,21 @@ case $build in stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" ;; esac + +# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. +if test "$GCC" = yes; then + saved_CFLAGS="$CFLAGS" + + # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. + CFLAGS="$CFLAGS -fkeep-inline-functions" + AC_MSG_CHECKING([whether -fkeep-inline-functions is supported]) + AC_TRY_COMPILE(,, + [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"], + [AC_MSG_RESULT([no])]) + + CFLAGS="$saved_CFLAGS" +fi + AC_SUBST(stage1_cflags) # Enable -Werror in bootstrap stage2 and later.