X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=configure.ac;h=920457464e57319e637debde345bfb333b989f14;hp=e632242cb535c97130cf9850a22d1a2fe72cdfcf;hb=febcf1b8e1ae674ed82a1586b4a9b41a962b76d3;hpb=d68451393afcbe8f25b843d0dd8d30a5d9ea78d6 diff --git a/configure.ac b/configure.ac index e632242cb53..920457464e5 100644 --- a/configure.ac +++ b/configure.ac @@ -174,7 +174,7 @@ host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib l # 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. -# If --enable-gold is used, "gold" will replace "ld". +# If --enable-gold is used, "gold" may replace "ld". host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen 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 gnattools" # libgcj represents the runtime libraries only used by gcj. @@ -315,37 +315,57 @@ case ${with_newlib} in esac # Handle --enable-gold. +# --enable-gold Build only gold +# --disable-gold [default] Build only ld +# --enable-gold=both Build both gold and ld, ld is default +# --enable-gold=both/ld Same +# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd AC_ARG_ENABLE(gold, -[ --enable-gold use gold instead of ld], +[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]], ENABLE_GOLD=$enableval, ENABLE_GOLD=no) -if test "${ENABLE_GOLD}" = "yes"; then - # Check for ELF target. - is_elf=no - case "${target}" in - *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ - | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ - | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*) + case "${ENABLE_GOLD}" in + yes|both|both/gold|both/ld) + # Check for ELF target. + is_elf=no + case "${target}" in + *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ + | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ + | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*) + case "${target}" in + *-*-linux*aout* | *-*-linux*oldld*) + ;; + *) + is_elf=yes + ;; + esac + esac + + if test "$is_elf" = "yes"; then + # Check for target supported by gold. case "${target}" in - *-*-linux*aout* | *-*-linux*oldld*) - ;; - *) - is_elf=yes + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) + case "${ENABLE_GOLD}" in + both*) + configdirs="$configdirs gold" + ;; + *) + configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" + ;; + esac + ENABLE_GOLD=yes ;; esac + fi + ;; + no) + ;; + *) + AC_MSG_ERROR([invalid --enable-gold argument]) + ;; esac - if test "$is_elf" = "yes"; then - # Check for target supported by gold. - case "${target}" in - i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) - configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" - ;; - esac - fi -fi - # Configure extra directories which are host specific case "${host}" in @@ -528,6 +548,7 @@ case "${target}" in noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap" ;; *-*-rtems*) + skipdirs="${skipdirs} target-libiberty" noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; # The tpf target doesn't support gdb yet. @@ -1510,8 +1531,6 @@ AC_ARG_WITH(boot-ldflags, AC_SUBST(poststage1_ldflags) # Check for PPL -ppl_major_version=0 -ppl_minor_version=10 ppllibs=" -lppl_c -lppl -lgmpxx" pplinc= @@ -1552,9 +1571,9 @@ ENABLE_PPL_CHECK=yes) if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pplinc $gmpinc" - AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) + AC_MSG_CHECKING([for version 0.10 (or later revision) of PPL]) AC_TRY_COMPILE([#include "ppl_c.h"],[ - #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version + #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 choke me #endif ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) @@ -1636,17 +1655,8 @@ AC_ARG_ENABLE(lto, enable_lto=$enableval, enable_lto=yes; default_enable_lto=yes) -ACX_ELF_TARGET_IFELSE([], -if test x"$default_enable_lto" = x"yes" ; then - enable_lto=no -else - if test x"$enable_lto" = x"yes"; then - AC_MSG_ERROR([LTO support requires an ELF target.]) - fi -fi -default_enable_lto=no) -if test x"$enable_lto" = x"yes" ; then +ACX_ELF_TARGET_IFELSE([if test x"$enable_lto" = x"yes" ; then # Make sure that libelf.h and gelf.h are available. AC_ARG_WITH(libelf, [ --with-libelf=PATH Specify prefix directory for the installed libelf package Equivalent to --with-libelf-include=PATH/include @@ -1782,7 +1792,25 @@ to specify its location.]) # Flags needed for libelf. AC_SUBST(libelflibs) AC_SUBST(libelfinc) -fi +fi],[if test x"$default_enable_lto" = x"yes" ; then + # On non-ELF platforms, LTO must be explicitly enabled. + enable_lto=no + else + # Apart from ELF platforms, only Windows supports LTO so far. It + # would also be nice to check the binutils support, but we don't + # have gcc_GAS_CHECK_FEATURE available here. For now, we'll just + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in + *-cygwin*|*-mingw*) ;; + x86_64-apple-darwin*) ;; + *) if test x"$enable_lto" = x"yes"; then + AC_MSG_ERROR([LTO support is not enabled for this target.]) + fi + ;; + esac + fi + default_enable_lto=no]) # By default, C is the only stage 1 language. @@ -2719,7 +2747,7 @@ else mv conftest.o conftest.o.g0 && ${CC} -c -g conftest.c && mv conftest.o conftest.o.g && - ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g; then + ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then : else BUILD_CONFIG=