X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=configure.in;h=e5068f22f48285784600dec005f7b5e258f47b24;hp=3354db154237b3ad340e088d4dc3ff103ab34672;hb=183010930e0f3fbe66c68d089afbd70266de26b5;hpb=634f7a13c64daa6880a2241827483e0fb28a6df3 diff --git a/configure.in b/configure.in index 3354db15423..e5068f22f48 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,8 @@ ### WARNING: this file contains embedded tabs. Do not run untabify on this file. sinclude(config/acx.m4) +sinclude(config/gcc-version.m4) +sinclude(config/gxx-include-dir.m4) AC_INIT(move-if-change) AC_PREREQ(2.13) @@ -80,10 +82,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 @@ -91,25 +100,21 @@ fi topsrcdir=$srcpwd extra_host_args= + # Define the trigger file to make sure configure will re-run whenever # the gcc version number changes. -if test "${with_gcc_version_trigger+set}" = set ; then - gcc_version_trigger="$with_gcc_version_trigger" - gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'` +TL_AC_GCC_VERSION([$topsrcdir]) +if test -f $gcc_version_trigger ; then + case "$ac_configure_args" in + *--with-gcc-version-trigger=$gcc_version_trigger* ) + ;; + * ) + # Add to all subconfigure arguments: build, host, and target. + ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger" + ;; + esac else - # If gcc's sources are available, define the trigger file. - if test -f ${topsrcdir}/gcc/version.c ; then - gcc_version_trigger=${topsrcdir}/gcc/version.c - gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'` - case "$ac_configure_args" in - *--with-gcc-version-trigger=$gcc_version_trigger* ) - ;; - * ) - # Add to all subconfigure arguments: build, host, and target. - ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger" - ;; - esac - fi + gcc_version_trigger= fi ### To add a new directory to the tree, first choose whether it is a target @@ -136,14 +141,14 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix # 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 # know that we are building the simulator. # binutils, gas and ld appear in that order because it makes sense to run # "make check" in that particular order. -host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar" +host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar" # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ @@ -250,8 +255,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 @@ -308,17 +313,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], @@ -374,11 +368,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}" @@ -472,6 +465,8 @@ case "${target}" in arc-*-*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; + arm-semi-aof ) + ;; arm-*-coff | strongarm-*-coff | xscale-*-coff) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -484,18 +479,12 @@ case "${target}" in arm-*-pe*) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - arm-*-oabi*) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - ;; thumb-*-coff) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; thumb-*-elf) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - thumb-*-oabi) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - ;; thumb-*-pe) noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; @@ -511,11 +500,16 @@ case "${target}" in c54x*-*-* | tic54x-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib" ;; - cris-*-*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + cris-*-* | crisv32-*-*) + case "${target}" in + *-*-elf | *-*-aout) + noconfigdirs="$noconfigdirs ${libgcj}";; + *) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";; + esac ;; 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}" @@ -535,19 +529,21 @@ case "${target}" in h8500-*-*) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" ;; + hppa1.1-*-osf* | hppa1.1-*-bsd* ) + ;; 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 # headers, crt*.o, etc., all of which are needed by these. noconfigdirs="$noconfigdirs target-zlib" ;; + parisc*-*-linux* | hppa*-*-linux*) + ;; hppa*-*-*elf* | \ - parisc*-*-linux* | hppa*-*-linux* | \ hppa*-*-lites* | \ hppa*-*-openbsd* | \ hppa*64*-*-*) noconfigdirs="$noconfigdirs ${libgcj}" - # Do configure ld/binutils/gas for this case. ;; hppa*-*-*) # According to Alexandre Oliva , libjava won't @@ -565,6 +561,8 @@ case "${target}" in # No gdb or ld support yet. noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld" ;; + i370-*-opened*) + ;; i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -602,10 +600,9 @@ case "${target}" in 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"; 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 @@ -616,6 +613,9 @@ case "${target}" in ;; esac ;; + i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \ + i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* ) + ;; i[[3456789]]86-*-pe) noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" ;; @@ -654,7 +654,7 @@ case "${target}" in noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; mmix-*-*) - noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss" + noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss target-libgfortran" ;; mn10200-*-*) noconfigdirs="$noconfigdirs ${libgcj}" @@ -682,6 +682,8 @@ case "${target}" in powerpc-*-eabi) noconfigdirs="$noconfigdirs ${libgcj}" ;; + powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* ) + ;; rs6000-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" ;; @@ -725,7 +727,7 @@ case "${target}" in romp-*-*) noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" ;; - sh-*-*) + sh-*-* | sh64-*-*) case "${host}" in i[[3456789]]86-*-vsta) ;; # don't add gprof back in i[[3456789]]86-*-go32*) ;; # don't add gprof back in @@ -734,9 +736,6 @@ case "${target}" in esac noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; - sh64-*-*) - noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" - ;; sparc-*-elf*) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -949,6 +948,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 @@ -1251,13 +1255,13 @@ The available languages are: ${potential_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 @@ -1268,6 +1272,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 @@ -1526,10 +1540,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 @@ -1632,10 +1642,25 @@ case "${host}" in ;; esac +# If no --enable-shared nor --disable-shared is specified, we set up +# LD_LIBRARY_PATH when we build for gcc. +case $enable_shared in +"") + if test -d ${srcdir}/gcc; then + set_lib_path=yes + else + set_lib_path=no + fi + ;; +*) + set_lib_path=$enable_shared + ;; +esac + # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. -case "${enable_shared}" in - no | "") SET_LIB_PATH= ;; +case "${set_lib_path}" in + no) SET_LIB_PATH= ;; *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;; esac @@ -1890,7 +1915,7 @@ baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor # desired. -build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" +build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}" # For host modules, accept cache file option, or specification as blank. case "${cache_file}" in @@ -1941,22 +1966,7 @@ fi target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}" # provide a proper gxx_include_dir. -# Note, if you change the default, make sure to fix both here and in -# the gcc and libstdc++-v3 subdirectories. -# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. -case "${with_gxx_include_dir}" in - yes) - AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory]) - ;; - no | "") - case "${enable_version_specific_runtime_libs}" in - yes) gxx_include_dir='${libsubdir}/include/c++' ;; - *) - . ${srcdir}/config.if - gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;; - esac ;; - *) gxx_include_dir=${with_gxx_include_dir} ;; -esac +TL_AC_GXX_INCLUDE_DIR FLAGS_FOR_TARGET= case " $target_configdirs " in @@ -2129,13 +2139,9 @@ AC_SUBST(SET_LIB_PATH) AC_SUBST(RPATH_ENVVAR) AC_SUBST(BUILD_PREFIX) AC_SUBST(BUILD_PREFIX_1) -AC_SUBST(gcc_version_trigger) -AC_SUBST(gcc_version) AC_SUBST(tooldir) AC_SUBST(build_tooldir) AC_SUBST(GDB_TK) -AC_SUBST(gxx_include_dir) -AC_SUBST(libstdcxx_incdir) # Build module lists & subconfigure args. AC_SUBST(build_configargs) @@ -2308,4 +2314,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 "${set_lib_path}" 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)