diff options
author | Tom Tromey <tromey@redhat.com> | 2013-01-02 14:58:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-01-02 14:58:15 +0000 |
commit | 4f05add48d231b7945916ec0fa0fe0f640e58b5c (patch) | |
tree | 5c313601745dc305e65d970fac2a33d7c408fe09 /gdb/configure | |
parent | 95830fd17d6ae253d8f6c2595188cadd59058799 (diff) | |
download | gdb-4f05add48d231b7945916ec0fa0fe0f640e58b5c.zip gdb-4f05add48d231b7945916ec0fa0fe0f640e58b5c.tar.gz gdb-4f05add48d231b7945916ec0fa0fe0f640e58b5c.tar.bz2 |
* config/i386/darwin.mh (NATDEPFILES): Remove machoread.o.
* configure.ac: Check for Mach-O support in BFD. Update
CONFIG_OBS.
* configure: Rebuild.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index fd6519b..6273193 100755 --- a/gdb/configure +++ b/gdb/configure @@ -12622,6 +12622,58 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h fi fi +# Add macho support to GDB, but only if BFD includes it. + + 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 Mach-O support in BFD" >&5 +$as_echo_n "checking for Mach-O support in BFD... " >&6; } +if test "${gdb_cv_var_macho+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + #include "bfd.h" + #include "mach-o.h" + +int +main () +{ +return bfd_mach_o_lookup_command (NULL, 0, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gdb_cv_var_macho=yes +else + gdb_cv_var_macho=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 +$as_echo "$gdb_cv_var_macho" >&6; } + CFLAGS=$OLD_CFLAGS + LDFLAGS=$OLD_LDFLAGS + LIBS=$OLD_LIBS +if test $gdb_cv_var_macho = yes; then + CONFIG_OBS="$CONFIG_OBS machoread.o" +fi + # Add any host-specific objects to GDB. CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" |