X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.in;h=8712586b3a5d61a1ff954161ce816da17607ac43;hb=bd21e58e631f4320cd48921034fdcabfdbd1c943;hp=15bf633ba637a7cc5ae0f6888b03804f04b559b4;hpb=de0b4a87132ddd506853479e685025ae1534296c;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.in b/configure.in index 15bf633ba6..8712586b3a 100644 --- a/configure.in +++ b/configure.in @@ -80,10 +80,17 @@ AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) moveifchange=${srcdir}/move-if-change +srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` + +# We pass INSTALL explicitly to sub-makes. Make sure that it is not +# a relative path. +if test "$INSTALL" = "${srcdir}/install-sh -c"; then + INSTALL="${srcpwd}/install-sh -c" +fi + # Set srcdir to "." if that's what it is. # This is important for multilib support. pwd=`${PWDCMD-pwd}` -srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` if test "${pwd}" = "${srcpwd}" ; then srcdir=. fi @@ -132,11 +139,11 @@ fi build_libs="build-libiberty" # these tools are built for the build environment -build_tools="build-texinfo build-byacc build-flex build-bison build-m4" +build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment # -host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libbanshee libcpp" +host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -183,11 +190,7 @@ target_tools="target-examples target-groff target-gperf target-rda" ## ${target_configdirs} is directories we build using the target tools. configdirs=`echo ${host_libs} ${host_tools}` target_configdirs=`echo ${target_libraries} ${target_tools}` - -# Only make build modules if build != host. -if test ${host_alias} != ${build_alias} ; then - build_configdirs=`echo ${build_libs} ${build_tools}` -fi +build_configdirs=`echo ${build_libs} ${build_tools}` ################################################################################ @@ -254,8 +257,8 @@ esac # If both --with-headers and --with-libs are specified, default to # --without-newlib. -if test x"${with_headers}" != x && test x"${with_headers} != xno \ - && test x"${with_libs}" != x && test x"${with_libs} != xno ; then +if test x"${with_headers}" != x && test x"${with_headers}" != xno \ + && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then if test x"${with_newlib}" = x ; then with_newlib=no fi @@ -312,17 +315,6 @@ case "${host}" in ;; esac -AC_ARG_WITH(libbanshee, -[ --without-libbanshee Don't build with libbanshee]) -case ${with_libbanshee} in - no) - noconfigdirs="$noconfigdirs libbanshee" ;; - yes|"") - with_libbanshee=yes - ;; - *) - AC_MSG_ERROR([--with-libbanshee can only be empty, "yes" or "no" (empty defaults to "yes".]) -esac AC_ARG_ENABLE(libada, [ --enable-libada Builds libada directory], @@ -378,11 +370,10 @@ case "${target}" in ;; powerpc-*-darwin*) noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" - noconfigdirs="$noconfigdirs target-libobjc" ;; *-*-darwin*) noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" - noconfigdirs="$noconfigdirs target-libobjc ${libgcj}" + noconfigdirs="$noconfigdirs ${libgcj}" ;; *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" @@ -423,8 +414,8 @@ case "${target}" in ;; esac ;; - *-*-netware) - noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}" + *-*-netware*) + noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" ;; *-*-rtems*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" @@ -442,7 +433,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) - noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss build-fixincludes ${libgcj}" ;; alpha*-*-linux*) # newlib is not 64 bit ready @@ -476,6 +467,9 @@ case "${target}" in arc-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; + arm-semi-aof ) + noconfigdirs="$noconfigdirs build-fixincludes" + ;; arm-*-coff | strongarm-*-coff | xscale-*-coff) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -507,7 +501,7 @@ case "${target}" in noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" ;; avr-*-*) - noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" + noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 build-fixincludes ${libgcj}" ;; c4x-*-* | tic4x-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" @@ -519,7 +513,7 @@ case "${target}" in noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" ;; crx-*-*) - noconfigdirs="$noconfigdirs target-libgloss target-libstdc++-v3 target-mudflap ${libgcj}" + noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}" ;; d10v-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" @@ -539,6 +533,9 @@ case "${target}" in h8500-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" ;; + hppa1.1-*-osf* | hppa1.1-*-bsd* ) + noconfigdirs="$noconfigdirs build-fixincludes" + ;; hppa*64*-*-linux* | parisc*64*-*-linux*) # In this case, it's because the hppa64-linux target is for # the kernel only at this point and has no libc, and thus no @@ -569,6 +566,9 @@ case "${target}" in # No gdb or ld support yet. noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld" ;; + i370-*-opened*) + noconfigdirs="$noconfigdirs build-fixincludes" + ;; i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -593,7 +593,7 @@ case "${target}" in ;; i[[3456789]]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" - noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj} build-fixincludes" # Can't build gdb for mingw32 if not native. case "${host}" in @@ -604,12 +604,11 @@ case "${target}" in ;; *-*-cygwin*) target_configdirs="$target_configdirs target-libtermcap target-winsup" - noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs target-gperf target-libgloss build-fixincludes ${libgcj}" # always build newlib if winsup directory is present. - if test -d "$srcdir/winsup" - then + if test -d "$srcdir/winsup"; then skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` - else + elif test -d "$srcdir/newlib"; then echo "Warning: winsup is missing so newlib can't be built." fi @@ -620,8 +619,12 @@ case "${target}" in ;; esac ;; + i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \ + i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* ) + noconfigdirs="$noconfigdirs build-fixincludes" + ;; i[[3456789]]86-*-pe) - noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} build-fixincludes" ;; i[[3456789]]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, @@ -684,7 +687,10 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; powerpc-*-eabi) - noconfigdirs="$noconfigdirs ${libgcj}" + noconfigdirs="$noconfigdirs ${libgcj} build-fixincludes" + ;; + powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* ) + noconfigdirs="$noconfigdirs build-fixincludes" ;; rs6000-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" @@ -943,6 +949,9 @@ case "${host}" in tentative_cc="/usr/cygnus/progressive/bin/gcc" host_makefile_frag="config/mh-lynxrs6k" ;; + powerpc-*-darwin*) + host_makefile_frag="config/mh-ppc-darwin" + ;; *-*-lynxos*) # /bin/cc is less than useful for our purposes. Always use GCC tentative_cc="/bin/gcc" @@ -950,6 +959,11 @@ case "${host}" in *-*-sysv4*) host_makefile_frag="config/mh-sysv4" ;; + # This is placed last to prevent interfering with the cases above. + i[[3456789]]86-*-*) + # Build the stage2 and stage3 compilers with -fomit-frame-pointer. + host_makefile_frag="config/mh-x86omitfp" + ;; esac fi @@ -985,7 +999,6 @@ if test "${build}" != "${host}" ; then CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} - BUILD_DIR_PREFIX=${build_subdir} BUILD_PREFIX=${build_alias}- BUILD_PREFIX_1=${build_alias}- @@ -1000,7 +1013,6 @@ else CC_FOR_BUILD="\$(CC)" GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" - BUILD_DIR_PREFIX= BUILD_PREFIX= BUILD_PREFIX_1=loser- @@ -1161,6 +1173,7 @@ if test -d ${srcdir}/gcc; then new_enable_languages=c missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + potential_languages=c for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do case ${lang_frag} in @@ -1176,14 +1189,15 @@ if test -d ${srcdir}/gcc; then lang_dirs= boot_language= build_by_default= - need_gmp= + need_gmp= . ${lang_frag} + potential_languages="${potential_languages},${language}" # This is quite sensitive to the ordering of the case statement arms. case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in *::*:*) echo "${lang_frag} doesn't set \$language." 1>&2 exit 1 - ;; + ;; *:ada:no:*) # Ada was requested with no preexisting GNAT. Disable unconditionally. add_this_lang=no @@ -1194,9 +1208,9 @@ if test -d ${srcdir}/gcc; then ;; *,all,*:*:*:no) # 'all' was selected, but this is not a default language - # so do not include it. + # so do not include it. add_this_lang=no - ;; + ;; *,all,*:*:*:*) # 'all' was selected and this is a default language; include it. add_this_lang=yes @@ -1206,10 +1220,17 @@ if test -d ${srcdir}/gcc; then ;; esac - # Disable language that need GMP if it isn't available. - if test x"$need_gmp" = xyes && test x"$have_gmp" = xno; then - add_this_lang=no - fi + # Disable languages that need GMP if it isn't available. + case ,${enable_languages},:${have_gmp}:${need_gmp} in + *,${language},*:no:yes) + # Specifically requested language; tell them. + AC_MSG_ERROR([GMP with MPFR support is required to build $language]) + ;; + *:no:yes) + # Silently disable. + add_this_lang=no + ;; + esac case $add_this_lang in no) @@ -1234,7 +1255,8 @@ if test -d ${srcdir}/gcc; then missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"` if test "x$missing_languages" != x; then AC_MSG_ERROR([ -The following requested languages were not found: ${missing_languages}]) +The following requested languages were not found: ${missing_languages} +The available languages are: ${potential_languages}]) fi if test "x$new_enable_languages" != "x$enable_languages"; then @@ -1244,13 +1266,13 @@ The following requested languages were not found: ${missing_languages}]) ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ ` fi -# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and -# $target_configdirs. +# Remove the entries in $skipdirs and $noconfigdirs from $configdirs, +# $build_configdirs and $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. notsupp="" for dir in . $skipdirs $noconfigdirs ; do - dirname=`echo $dir | sed -e s/target-//g` + dirname=`echo $dir | sed -e s/target-//g -e s/build-//g` if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` if test -r $srcdir/$dirname/configure ; then @@ -1261,6 +1283,16 @@ for dir in . $skipdirs $noconfigdirs ; do fi fi fi + if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"` + if test -r $srcdir/$dirname/configure ; then + if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then + true + else + notsupp="$notsupp $dir" + fi + fi + fi if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` if test -r $srcdir/$dirname/configure ; then @@ -1434,10 +1466,7 @@ extra_nmflags_for_target= extra_ranlibflags_for_target= target_makefile_frag=/dev/null case "${target}" in - i[[3456789]]86-*-netware*) - target_makefile_frag="config/mt-netware" - ;; - powerpc-*-netware*) + *-*-netware*) target_makefile_frag="config/mt-netware" ;; *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu) @@ -1522,10 +1551,6 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target- extra_host_args="$extra_host_args --with-newlib" fi -if test x${with_libbanshee} = xyes && echo " ${configdirs} " | grep " libbanshee " >/dev/null 2>&1; then - extra_host_args="$extra_host_args --with-libbanshee" -fi - # Default to using --with-stabs for certain targets. if test x${with_stabs} = x ; then case "${target}" in @@ -1685,28 +1710,62 @@ esac # not to nest @if/@endif pairs, because configure will not warn you at all. 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 +[ --enable-bootstrap[=lean] Enable bootstrapping [no]],, +enable_bootstrap=default) + +# Issue errors and warnings for invalid/strange bootstrap combinations. +case "$configdirs" in + *gcc*) have_compiler=yes ;; + *) have_compiler=no ;; +esac + +case "$have_compiler:$host:$target:$enable_bootstrap" in + *:*:*:no) ;; + + # Default behavior. (We'll) enable bootstrap if we have a compiler + # and we are in a native configuration. + yes:$build:$build:default) + # This will become 'yes' + enable_bootstrap=no ;; + + *:*:*:default) + enable_bootstrap=no ;; + # We have a compiler and we are in a native configuration, bootstrap is ok + yes:$build:$build:yes | yes:$build:$build:lean) + ;; + + # Other configurations, but we have a compiler. Assume the user knows + # what he's doing. + yes:*:*:yes | yes:*:*:lean) + AC_MSG_WARN([trying to bootstrap a cross compiler]) + ;; + + # No compiler: if they passed --enable-bootstrap explicitly, fail + no:*:*:yes | no:*:*:lean) + AC_MSG_ERROR([cannot bootstrap without a compiler]) ;; + + # Fail if wrong command line + *) + AC_MSG_ERROR([invalid option for --enable-bootstrap]) + ;; +esac + +# Adjust the toplevel makefile according to whether bootstrap was selected. case "$enable_bootstrap" in yes) + bootstrap_lean='#' + default_target=bootstrap + bootstrap_suffix=bootstrap ;; + lean) + bootstrap_lean='' default_target=bootstrap bootstrap_suffix=bootstrap ;; no) default_target=all bootstrap_suffix=no-bootstrap ;; esac +AC_SUBST(bootstrap_lean) AC_SUBST(default_target) for module in ${build_configdirs} ; do @@ -2089,7 +2148,6 @@ AC_SUBST_FILE(ospace_frag) # Miscellanea: directories, flags, etc. AC_SUBST(SET_LIB_PATH) AC_SUBST(RPATH_ENVVAR) -AC_SUBST(BUILD_DIR_PREFIX) AC_SUBST(BUILD_PREFIX) AC_SUBST(BUILD_PREFIX_1) AC_SUBST(gcc_version_trigger) @@ -2231,7 +2289,7 @@ esac AC_SUBST(stage1_cflags) # It makes debugging easier if we create as symlinks the stage directories -# gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not +# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not # possible, however, we can resort to mv. AC_CACHE_CHECK([if symbolic links between directories work], [gcc_cv_prog_ln_s_dir], @@ -2271,4 +2329,24 @@ case ${enable_werror} in esac AC_SUBST(stage2_werror_flag) +# If gcc is built natively with shared library enabled, set +# $RPATH_ENVVAR to make sure the newly built gcc shared librares are +# used. +SET_GCC_LIB_PATH= +if test -d ${srcdir}/gcc && test x${is_cross_compiler} = xno; then + case "${enable_shared}" in + no | "") ;; + *) + eval "d=\$$RPATH_ENVVAR" + if test x"$d" != x; then + d="$pwd/gcc:$d" + else + d="$pwd/gcc" + fi + SET_GCC_LIB_PATH="\$(RPATH_ENVVAR)=$d; export \$(RPATH_ENVVAR);" + ;; + esac +fi +AC_SUBST(SET_GCC_LIB_PATH) + AC_OUTPUT(Makefile)