diff options
author | Nick Clifton <nickc@redhat.com> | 2010-02-15 10:37:55 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-02-15 10:37:55 +0000 |
commit | 143754cd36b6f4b9b0788adb1e0296b30f65d776 (patch) | |
tree | 6274a3bbbb4ea3065aa8bd460143733cade55e91 | |
parent | ab7875de80fd04d985fcf167c193bfc4e978fd5c (diff) | |
download | fsf-binutils-gdb-143754cd36b6f4b9b0788adb1e0296b30f65d776.zip fsf-binutils-gdb-143754cd36b6f4b9b0788adb1e0296b30f65d776.tar.gz fsf-binutils-gdb-143754cd36b6f4b9b0788adb1e0296b30f65d776.tar.bz2 |
Sync from gcc mainline.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | config/ChangeLog | 4 | ||||
-rw-r--r-- | config/elf.m4 | 27 | ||||
-rwxr-xr-x | configure | 82 | ||||
-rw-r--r-- | configure.ac | 48 |
5 files changed, 124 insertions, 42 deletions
@@ -1,3 +1,8 @@ +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: diff --git a/config/ChangeLog b/config/ChangeLog index 9e524fc..9593e9a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/config/elf.m4 b/config/elf.m4 new file mode 100644 index 0000000..44d0249 --- /dev/null +++ b/config/elf.m4 @@ -0,0 +1,27 @@ +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]) +]) @@ -684,8 +684,8 @@ clooginc clooglibs pplinc ppllibs -poststage1_libs poststage1_ldflags +poststage1_libs stage1_libs stage1_ldflags extra_mpc_mpfr_configure_flags @@ -797,8 +797,8 @@ with_gmp_lib 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 @@ -1532,8 +1532,8 @@ Optional Packages: 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 @@ -3261,6 +3261,7 @@ case "${target}" in case "${target}" in i*86-*-*) ;; alpha*-*-*) ;; + x86_64-*-*) ;; *) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -5738,25 +5739,6 @@ fi -# 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. @@ -5773,6 +5755,27 @@ fi +# 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 @@ -5927,8 +5930,8 @@ fi 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" @@ -5936,7 +5939,7 @@ int 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 @@ -5968,6 +5971,35 @@ else 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. diff --git a/configure.ac b/configure.ac index be6337b..3464166 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 |