+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ * configure.ac: Sync from gcc.
+ * configure: Regenerate.
+
2010-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sync from gcc:
+2010-02-15 Nick Clifton <nickc@redhat.com>
+
+ * elf.m4: Import from gcc mainline.
+
2009-11-30 Joseph Myers <joseph@codesourcery.com>
* largefile.m4 (ACX_LARGEFILE): Require AC_CANONICAL_HOST and
--- /dev/null
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paolo Bonzini.
+
+dnl usage: ACX_ELF_TARGET_IFELSE([if-elf], [if-not-elf])
+AC_DEFUN([ACX_ELF_TARGET_IFELSE], [
+AC_REQUIRE([AC_CANONICAL_TARGET])
+
+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
+
+AS_IF([test $target_elf = yes], [$1], [$2])
+])
clooglibs
pplinc
ppllibs
-poststage1_libs
poststage1_ldflags
+poststage1_libs
stage1_libs
stage1_ldflags
extra_mpc_mpfr_configure_flags
with_host_libstdcxx
with_stage1_ldflags
with_stage1_libs
-with_boot_ldflags
with_boot_libs
+with_boot_ldflags
with_ppl
with_ppl_include
with_ppl_lib
when linking with PPL
--with-stage1-ldflags=FLAGS Linker flags for stage1
-with-stage1-libs=LIBS Libraries for stage1
- --with-boot-ldflags=FLAGS Linker flags for stage2 and later
--with-boot-libs=LIBS Libraries for stage2 and later
+ --with-boot-ldflags=FLAGS Linker flags for stage2 and later
--with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
plus --with-ppl-lib=PATH/lib
case "${target}" in
i*86-*-*) ;;
alpha*-*-*) ;;
+ x86_64-*-*) ;;
*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
-# Linker flags to use for stage2 and later builds.
-
-# Check whether --with-boot-ldflags was given.
-if test "${with_boot_ldflags+set}" = set; then :
- withval=$with_boot_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then
- poststage1_ldflags=
- else
- poststage1_ldflags=$withval
- fi
-else
- if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
- poststage1_ldflags=-static-libstdc++
- else
- poststage1_ldflags=
- fi
-fi
-
-
-
# Libraries to use for stage2 and later builds. This defaults to the
# argument passed to --with-host-libstdcxx.
+# Linker flags to use for stage2 and later builds.
+
+# Check whether --with-boot-ldflags was given.
+if test "${with_boot_ldflags+set}" = set; then :
+ withval=$with_boot_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then
+ poststage1_ldflags=
+ else
+ poststage1_ldflags=$withval
+ fi
+else
+ poststage1_ldflags=
+ # With --enable-build-with-cxx, default to linking libstdc++ and
+ # libgcc statically. But if the user explicitly specified the
+ # libraries to use, trust that they are doing what they want.
+ if test "$ENABLE_BUILD_WITH_CXX" = "yes" -a "$poststage1_libs" = ""; then
+ poststage1_ldflags="-static-libstdc++ -static-libgcc"
+ fi
+fi
+
+
+
# Check for PPL
ppl_major_version=0
ppl_minor_version=10
if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of CLooG" >&5
-$as_echo_n "checking for correct version of CLooG... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.15.5 (or later revision) of CLooG" >&5
+$as_echo_n "checking for version 0.15.5 (or later revision) of CLooG... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "cloog/cloog.h"
main ()
{
- #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+ #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
choke me
#endif
fi
+
+
+
+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.
m4_include(config/acx.m4)
m4_include(config/override.m4)
m4_include(config/proginstall.m4)
+m4_include(config/elf.m4)
m4_include([libtool.m4])
m4_include([ltoptions.m4])
m4_include([ltsugar.m4])
case "${target}" in
i*86-*-*) ;;
alpha*-*-*) ;;
+ x86_64-*-*) ;;
*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
[stage1_libs=$with_host_libstdcxx])
AC_SUBST(stage1_libs)
-# Linker flags to use for stage2 and later builds.
-AC_ARG_WITH(boot-ldflags,
-[ --with-boot-ldflags=FLAGS Linker flags for stage2 and later],
-[if test "$withval" = "no" -o "$withval" = "yes"; then
- poststage1_ldflags=
- else
- poststage1_ldflags=$withval
- fi],
-[if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
- poststage1_ldflags=-static-libstdc++
- else
- poststage1_ldflags=
- fi])
-AC_SUBST(poststage1_ldflags)
-
# Libraries to use for stage2 and later builds. This defaults to the
# argument passed to --with-host-libstdcxx.
AC_ARG_WITH(boot-libs,
[poststage1_libs=$with_host_libstdcxx])
AC_SUBST(poststage1_libs)
+# Linker flags to use for stage2 and later builds.
+AC_ARG_WITH(boot-ldflags,
+[ --with-boot-ldflags=FLAGS Linker flags for stage2 and later],
+[if test "$withval" = "no" -o "$withval" = "yes"; then
+ poststage1_ldflags=
+ else
+ poststage1_ldflags=$withval
+ fi],
+[poststage1_ldflags=
+ # With --enable-build-with-cxx, default to linking libstdc++ and
+ # libgcc statically. But if the user explicitly specified the
+ # libraries to use, trust that they are doing what they want.
+ if test "$ENABLE_BUILD_WITH_CXX" = "yes" -a "$poststage1_libs" = ""; then
+ poststage1_ldflags="-static-libstdc++ -static-libgcc"
+ fi])
+AC_SUBST(poststage1_ldflags)
+
# Check for PPL
ppl_major_version=0
ppl_minor_version=10
if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
- AC_MSG_CHECKING([for correct version of CLooG])
+ AC_MSG_CHECKING([for version 0.15.5 (or later revision) of CLooG])
AC_TRY_COMPILE([#include "cloog/cloog.h"],[
- #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+ #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
choke me
#endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
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
# 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