diff options
author | Tom Tromey <tromey@redhat.com> | 2013-01-02 14:54:17 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-01-02 14:54:17 +0000 |
commit | def63ff00a1e687b2463b4ec6ce249722223242e (patch) | |
tree | b4e99cefbe56617fb61a34f208126991ab33b0d0 /gdb/configure | |
parent | 517bb291f28f940b186e9dc899eb621f71839e82 (diff) | |
download | binutils-gdb-def63ff00a1e687b2463b4ec6ce249722223242e.tar.gz |
* acinclude.m4 (GDB_AC_CHECK_BFD): New macro.
* configure.ac: Use GDB_AC_CHECK_BFD.
* configure: Rebuild.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/gdb/configure b/gdb/configure index 53a6ca9e760..fd6519b3d49 100755 --- a/gdb/configure +++ b/gdb/configure @@ -12564,21 +12564,22 @@ esac # Add ELF support to GDB, but only if BFD includes ELF support. -OLD_CFLAGS=$CFLAGS -OLD_LDFLAGS=$LDFLAGS -OLD_LIBS=$LIBS -# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS -# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We -# always want our bfd. -CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" -LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" -intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` -# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. -if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" -fi -LIBS="-lbfd -liberty $intl $LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 + + OLD_CFLAGS=$CFLAGS + OLD_LDFLAGS=$LDFLAGS + OLD_LIBS=$LIBS + # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS + # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We + # always want our bfd. + CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" + LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" + intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` + # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. + if test "$plugins" = "yes"; then + LIBS="-ldl $LIBS" + fi + LIBS="-lbfd -liberty $intl $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 $as_echo_n "checking for ELF support in BFD... " >&6; } if test "${gdb_cv_var_elf+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -12586,13 +12587,13 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> -#include "bfd.h" -#include "elf-bfd.h" + #include "bfd.h" + #include "elf-bfd.h" int main () { -bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); +return bfd_get_elf_phdr_upper_bound (NULL); ; return 0; } @@ -12607,6 +12608,9 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 $as_echo "$gdb_cv_var_elf" >&6; } + CFLAGS=$OLD_CFLAGS + LDFLAGS=$OLD_LDFLAGS + LIBS=$OLD_LIBS if test $gdb_cv_var_elf = yes; then CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" @@ -12614,12 +12618,9 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. if test "$plugins" = "yes"; then - OLD_LIBS="-ldl $OLD_LIBS" + LIBS="-ldl $LIBS" fi fi -CFLAGS=$OLD_CFLAGS -LDFLAGS=$OLD_LDFLAGS -LIBS=$OLD_LIBS # Add any host-specific objects to GDB. CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" |