summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-02-15 10:37:55 +0000
committerNick Clifton <nickc@redhat.com>2010-02-15 10:37:55 +0000
commitf107c370b373e74f5210f873c30724aa66d447cf (patch)
treee175e6b37b802373cdedbc023ad7fc7ed5628d1b /configure.ac
parent8103e40743ef5034dd475e9a52b300bd14be1878 (diff)
downloadcygnal-f107c370b373e74f5210f873c30724aa66d447cf.tar.gz
cygnal-f107c370b373e74f5210f873c30724aa66d447cf.tar.bz2
cygnal-f107c370b373e74f5210f873c30724aa66d447cf.zip
Sync from gcc mainline.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 31 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index be6337bf5..346416673 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,7 @@
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])
@@ -497,6 +498,7 @@ case "${target}" in
case "${target}" in
i*86-*-*) ;;
alpha*-*-*) ;;
+ x86_64-*-*) ;;
*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -1475,21 +1477,6 @@ AC_ARG_WITH(stage1-libs,
[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,
@@ -1502,6 +1489,23 @@ 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
@@ -1605,9 +1609,9 @@ ENABLE_CLOOG_CHECK=yes)
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= ])
@@ -1624,6 +1628,16 @@ 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
# 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