diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 13:45:25 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-16 13:45:25 +0000 |
commit | d68451393afcbe8f25b843d0dd8d30a5d9ea78d6 (patch) | |
tree | d9a473d88d703aacdf7e3191ba2b717abcb59e6d /configure.ac | |
parent | a44dc11544d24e159da34f774c93f4383131486e (diff) | |
download | gcc-d68451393afcbe8f25b843d0dd8d30a5d9ea78d6.tar.gz |
toplevel:
* configure.ac: Check for elf_getshdrstrndx or elf_getshstrndx
separately.
* configure: Regenerate.
gcc:
* configure.ac: Check for elf_getshdrstrndx or elf_getshstrndx
flavor.
* configure: Regenerate.
* config.in: Regenerate.
* doc/install.texi (Prerequisites): Document that Solaris 2 libelf
works.
gcc/lto:
* lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 43d6d5d4511..e632242cb53 100644 --- a/configure.ac +++ b/configure.ac @@ -1735,7 +1735,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 +1743,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 <libelf.h>],[ + elf_getshdrstrndx (0, 0); + ], + [AC_MSG_RESULT([yes]);], + [AC_MSG_RESULT([no]); + AC_MSG_CHECKING([for elf_getshstrndx]) + AC_TRY_LINK( + [#include <libelf.h>],[ + 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 |