Merge from gcc:
2010-05-18 Steven Bosscher <steven AT gcc.gnu.org> * configure.ac (--enable-lto): All *-apple-darwin* now support LTO. * configure: Regenerate. 2010-05-07 Steven Bosscher <steven AT gcc.gnu.org> * configure.ac (--enable-lto): Add x86_64-apple-darwin* as a platform that supports LTO. * configure: Regenerate. 2010-04-27 Dave Korn <dave.korn.cygwin AT gmail.com> PR lto/42776 * configure.ac (--enable-lto): Refactor handling so libelf tests are only performed inside then-clause of ACX_ELF_TARGET_IFELSE, and allow LTO to be explicitly enabled on non-ELF platforms that are known to support it inside else-clause. * configure: Regenerate.
This commit is contained in:
parent
71de140011
commit
0b3906a813
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
||||||
|
2010-05-26 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
|
Merge from gcc:
|
||||||
|
|
||||||
|
2010-05-18 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
* configure.ac (--enable-lto): All *-apple-darwin* now support LTO.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
* configure.ac (--enable-lto): Add x86_64-apple-darwin* as
|
||||||
|
a platform that supports LTO.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
PR lto/42776
|
||||||
|
* configure.ac (--enable-lto): Refactor handling so libelf tests
|
||||||
|
are only performed inside then-clause of ACX_ELF_TARGET_IFELSE,
|
||||||
|
and allow LTO to be explicitly enabled on non-ELF platforms that
|
||||||
|
are known to support it inside else-clause.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2010-04-27 Roland McGrath <roland@redhat.com>
|
2010-04-27 Roland McGrath <roland@redhat.com>
|
||||||
H.J. Lu <hongjiu.lu@intel.com>
|
H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
|
|
@ -5995,95 +5995,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ac_ext=c
|
||||||
|
|
||||||
target_elf=no
|
|
||||||
case $target in
|
|
||||||
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
|
|
||||||
*-msdosdjgpp* | *-netware* | *-vms* | *-wince* | *-*-pe* | \
|
|
||||||
alpha*-dec-osf* | *-interix*)
|
|
||||||
target_elf=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
target_elf=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test $target_elf = yes; then :
|
|
||||||
|
|
||||||
else
|
|
||||||
if test x"$default_enable_lto" = x"yes" ; then
|
|
||||||
enable_lto=no
|
|
||||||
else
|
|
||||||
if test x"$enable_lto" = x"yes"; then
|
|
||||||
as_fn_error "LTO support requires an ELF target." "$LINENO" 5
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
default_enable_lto=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test x"$enable_lto" = x"yes" ; then
|
|
||||||
# Make sure that libelf.h and gelf.h are available.
|
|
||||||
|
|
||||||
# Check whether --with-libelf was given.
|
|
||||||
if test "${with_libelf+set}" = set; then :
|
|
||||||
withval=$with_libelf;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-libelf_include was given.
|
|
||||||
if test "${with_libelf_include+set}" = set; then :
|
|
||||||
withval=$with_libelf_include;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-libelf_lib was given.
|
|
||||||
if test "${with_libelf_lib+set}" = set; then :
|
|
||||||
withval=$with_libelf_lib;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
saved_CFLAGS="$CFLAGS"
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
|
|
||||||
case $with_libelf in
|
|
||||||
"")
|
|
||||||
libelflibs="-lelf"
|
|
||||||
libelfinc="-I/usr/include/libelf"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
libelflibs="-L$with_libelf/lib -lelf"
|
|
||||||
libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf"
|
|
||||||
LIBS="$libelflibs $LIBS"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "x$with_libelf_include" != x; then
|
|
||||||
libelfinc="-I$with_libelf_include"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$with_libelf_lib" != x; then
|
|
||||||
libelflibs="-L$with_libelf_lib -lelf"
|
|
||||||
LIBS="$libelflibs $LIBS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \
|
|
||||||
&& test -d ${srcdir}/libelf; then
|
|
||||||
libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/lib -lelf '
|
|
||||||
libelfinc='-D__LIBELF_INTERNAL__ -I$$r/$(HOST_SUBDIR)/libelf/lib -I$$s/libelf/lib'
|
|
||||||
LIBS="$libelflibs $LIBS"
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS $libelfinc"
|
|
||||||
CPPFLAGS="$CPPFLAGS $libelfinc"
|
|
||||||
LIBS="$LIBS $libelflibs"
|
|
||||||
|
|
||||||
ac_ext=c
|
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
@ -6481,7 +6393,83 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
for ac_header in libelf.h
|
|
||||||
|
|
||||||
|
|
||||||
|
target_elf=no
|
||||||
|
case $target in
|
||||||
|
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
|
||||||
|
*-msdosdjgpp* | *-netware* | *-vms* | *-wince* | *-*-pe* | \
|
||||||
|
alpha*-dec-osf* | *-interix*)
|
||||||
|
target_elf=no
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
target_elf=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test $target_elf = yes; then :
|
||||||
|
if test x"$enable_lto" = x"yes" ; then
|
||||||
|
# Make sure that libelf.h and gelf.h are available.
|
||||||
|
|
||||||
|
# Check whether --with-libelf was given.
|
||||||
|
if test "${with_libelf+set}" = set; then :
|
||||||
|
withval=$with_libelf;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-libelf_include was given.
|
||||||
|
if test "${with_libelf_include+set}" = set; then :
|
||||||
|
withval=$with_libelf_include;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-libelf_lib was given.
|
||||||
|
if test "${with_libelf_lib+set}" = set; then :
|
||||||
|
withval=$with_libelf_lib;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
|
||||||
|
case $with_libelf in
|
||||||
|
"")
|
||||||
|
libelflibs="-lelf"
|
||||||
|
libelfinc="-I/usr/include/libelf"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
libelflibs="-L$with_libelf/lib -lelf"
|
||||||
|
libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf"
|
||||||
|
LIBS="$libelflibs $LIBS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "x$with_libelf_include" != x; then
|
||||||
|
libelfinc="-I$with_libelf_include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$with_libelf_lib" != x; then
|
||||||
|
libelflibs="-L$with_libelf_lib -lelf"
|
||||||
|
LIBS="$libelflibs $LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \
|
||||||
|
&& test -d ${srcdir}/libelf; then
|
||||||
|
libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/lib -lelf '
|
||||||
|
libelfinc='-D__LIBELF_INTERNAL__ -I$$r/$(HOST_SUBDIR)/libelf/lib -I$$s/libelf/lib'
|
||||||
|
LIBS="$libelflibs $LIBS"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS $libelfinc"
|
||||||
|
CPPFLAGS="$CPPFLAGS $libelfinc"
|
||||||
|
LIBS="$LIBS $libelflibs"
|
||||||
|
|
||||||
|
for ac_header in libelf.h
|
||||||
do :
|
do :
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
|
||||||
if test "x$ac_cv_header_libelf_h" = x""yes; then :
|
if test "x$ac_cv_header_libelf_h" = x""yes; then :
|
||||||
|
@ -6612,6 +6600,28 @@ to specify its location." "$LINENO" 5
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
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*) ;;
|
||||||
|
*-apple-darwin*) ;;
|
||||||
|
*) if test x"$enable_lto" = x"yes"; then
|
||||||
|
as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
default_enable_lto=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# By default, C is the only stage 1 language.
|
# By default, C is the only stage 1 language.
|
||||||
|
|
31
configure.ac
31
configure.ac
|
@ -1651,17 +1651,8 @@ AC_ARG_ENABLE(lto,
|
||||||
enable_lto=$enableval,
|
enable_lto=$enableval,
|
||||||
enable_lto=yes; default_enable_lto=yes)
|
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.
|
# 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
|
AC_ARG_WITH(libelf, [ --with-libelf=PATH Specify prefix directory for the installed libelf package
|
||||||
Equivalent to --with-libelf-include=PATH/include
|
Equivalent to --with-libelf-include=PATH/include
|
||||||
|
@ -1777,7 +1768,25 @@ to specify its location.])
|
||||||
# Flags needed for libelf.
|
# Flags needed for libelf.
|
||||||
AC_SUBST(libelflibs)
|
AC_SUBST(libelflibs)
|
||||||
AC_SUBST(libelfinc)
|
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*) ;;
|
||||||
|
*-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.
|
# By default, C is the only stage 1 language.
|
||||||
|
|
Loading…
Reference in New Issue