summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-16 13:45:25 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-16 13:45:25 +0000
commitd68451393afcbe8f25b843d0dd8d30a5d9ea78d6 (patch)
treed9a473d88d703aacdf7e3191ba2b717abcb59e6d /configure.ac
parenta44dc11544d24e159da34f774c93f4383131486e (diff)
downloadgcc-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.ac22
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