diff options
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index 9d9309e..7883511 100755 --- a/gdb/configure +++ b/gdb/configure @@ -21797,6 +21797,82 @@ _ACEOF esac +# Add ELF support to GDB, but only if BFD includes ELF support. +OLD_CFLAGS=$CFLAGS +OLD_LDFLAGS=$LDFLAGS +OLD_LIBS=$LIBS +CFLAGS="$CFLAGS -I${srcdir}/../include -I${objdir}/../bfd -I${srcdir}/../bfd" +LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" +LIBS="$LIBS -lbfd -liberty" +echo "$as_me:$LINENO: checking for ELF support in BFD" >&5 +echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6 +if test "${gdb_cv_var_elf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include "bfd.h" +#include "elf-bfd.h" + +int +main () +{ +bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gdb_cv_var_elf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gdb_cv_var_elf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5 +echo "${ECHO_T}$gdb_cv_var_elf" >&6 +if test $gdb_cv_var_elf = yes; then + CONFIG_OBS="$CONFIG_OBS elfread.o" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ELF 1 +_ACEOF + +fi +CFLAGS=$OLD_CFLAGS +LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS + # Add any host-specific objects to GDB. CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" |