X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure.ac;h=1ae21407cb8f68f5e2597ddb1c3feef3061b649c;hb=fd6e08146f4d28b5c5ffbf0505a9debc8bd8865d;hp=2e8dbe0e9bd3d92cde5d3515ba965d378f70ac75;hpb=2d1d165ab2977e43abd515b06d85f9d4c23f6248;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure.ac b/configure.ac index 2e8dbe0e9bd..1ae21407cb8 100644 --- a/configure.ac +++ b/configure.ac @@ -528,6 +528,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. @@ -547,7 +548,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 target-newlib target-libgloss ${libgcj}" ;; alpha*-*-linux*) # newlib is not 64 bit ready @@ -1636,17 +1637,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 @@ -1735,7 +1727,6 @@ if test x"$enable_lto" = x"yes" ; then elf_nextscn (0, 0); elf_strptr (0, 0, 0); elf_getident (0, 0); - elf_getshdrstrndx (0, 0); elf_begin (0, 0, 0); elf_ndxscn (0); elf_end (0); @@ -1744,6 +1735,27 @@ if test x"$enable_lto" = x"yes" ; then [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ] ) + # Check for elf_getshdrstrndx or elf_getshstrndx. The latter's flavor + # is determined in gcc/configure.ac. + if test x"$enable_lto" = x"yes" ; then + AC_MSG_CHECKING([for elf_getshdrstrndx]) + AC_TRY_LINK( + [#include ],[ + elf_getshdrstrndx (0, 0); + ], + [AC_MSG_RESULT([yes]);], + [AC_MSG_RESULT([no]); + AC_MSG_CHECKING([for elf_getshstrndx]) + AC_TRY_LINK( + [#include ],[ + elf_getshstrndx (0, 0); + ], + [AC_MSG_RESULT([yes]);], + [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ] + )] + ) + fi + # If we couldn't enable LTO and the user forced it, emit an error. if test x"$enable_lto" = x"no" \ && test x"$default_enable_lto" != x"yes" ; then @@ -1762,7 +1774,24 @@ 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*) ;; + *) 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. @@ -2699,7 +2728,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=