Do not build libctf for targets that do not use the ELF file format.
authorNick Clifton <nickc@redhat.com>
Wed, 29 May 2019 10:31:16 +0000 (11:31 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 29 May 2019 10:32:34 +0000 (11:32 +0100)
top * configure.ac (noconfigdirs): Add libctf if the target does not use
the ELF file format.
* configure: Regenerate.

binutils* configure.ac (LIBCTF): Export.  Set to empty for non-ELF based
targets.
(HAVE_LIBCTF): Define if libctf support is available.
* Makefile.am (LIBCTF): Set value to @LIBCTF@.
* objdump.c: Make CTF code conditional upon HAVE_LIBCTF being
defined.
* readelf.c: Likewise.
* configure: Regenerate.
* Makefile.in: Regenerate.
* config.in: Regenerate.

12 files changed:
ChangeLog
binutils/ChangeLog
binutils/Makefile.am
binutils/Makefile.in
binutils/config.in
binutils/configure
binutils/configure.ac
binutils/doc/Makefile.in
binutils/objdump.c
binutils/readelf.c
configure
configure.ac

index cbfb2155c2e4b5ffe4d55203a1c3c6df6549dde2..f527876b09db9634ea16546812e2a49c270da0d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-29  Nick Clifton  <nickc@redhat.com>
+
+       * configure.ac (noconfigdirs): Add libctf if the target does not use
+       the ELF file format.
+       * configure: Regenerate.
+
 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
 
        * Makefile.def (dependencies): configure-libctf depends on all-bfd
index ac3f3b9a2fefefb37588e1bab7a13d0e60314d5a..f4a9e6a4fdd89c6c0ebd7d8d5f10ed89685b815d 100644 (file)
@@ -1,3 +1,16 @@
+2019-05-29  Nick Clifton  <nickc@redhat.com>
+
+       * configure.ac (LIBCTF): Export.  Set to empty for non-ELF based
+       targets.
+       (HAVE_LIBCTF): Define if libctf support is available.
+       * Makefile.am (LIBCTF): Set value to @LIBCTF@.
+       * objdump.c: Make CTF code conditional upon HAVE_LIBCTF being
+       defined.
+       * readelf.c: Likewise.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+       * config.in: Regenerate.
+
 2019-05-28  Nick Alcock  <nick.alcock@oracle.com>
 
        * MAINTAINERS: Add myself as CTF maintainer.
index 128494ca9eef9523c5a67b830fde2abb856c4315..c37a5b521d9d76ac626db1823323a8ba5b4739d9 100644 (file)
@@ -161,7 +161,7 @@ BFDLIB = ../bfd/libbfd.la
 
 OPCODES = ../opcodes/libopcodes.la
 
-LIBCTF = ../libctf/libctf.a
+LIBCTF = @LIBCTF@
 
 LIBIBERTY = ../libiberty/libiberty.a
 
@@ -229,7 +229,7 @@ windres_DEPENDENCIES =   $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
 windmc_DEPENDENCIES =    $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
 addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
 readelf_DEPENDENCIES =   $(LIBINTL_DEP) $(LIBIBERTY) $(LIBCTF)
-elfedit_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+elfedit_DEPENDENCIES =   $(LIBINTL_DEP) $(LIBIBERTY)
 dllwrap_DEPENDENCIES =   $(LIBINTL_DEP) $(LIBIBERTY)
 bfdtest1_DEPENDENCIES =  $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
 bfdtest2_DEPENDENCIES =  $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
index 480385bd67b9559b310749e841d38a580dc988d1..705b19e1b5d6fe350d67de3af22392f07693a861 100644 (file)
@@ -443,6 +443,7 @@ LDFLAGS = @LDFLAGS@
 LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 LEXLIB = @LEXLIB@
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCTF = @LIBCTF@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBINTL_DEP = @LIBINTL_DEP@
@@ -648,7 +649,6 @@ BULIBS = bucomm.c version.c filemode.c
 ELFLIBS = elfcomm.c
 BFDLIB = ../bfd/libbfd.la
 OPCODES = ../opcodes/libopcodes.la
-LIBCTF = ../libctf/libctf.a
 LIBIBERTY = ../libiberty/libiberty.a
 POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
 EXPECT = expect
index 72ead4eb61288714b8144c807b9ad2ec072aedf6..edd7615a2754d0022f5481593de81dbb9ef83490 100644 (file)
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
+/* Is libctf available? */
+#undef HAVE_LIBCTF
+
 /* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 
index 17cca12070f5a8622de7d07bf7293e0a309025d9..a653a714881729c591055f794d9de035fc82520d 100755 (executable)
@@ -636,6 +636,7 @@ LTLIBOBJS
 LIBOBJS
 EMULATION_VECTOR
 EMULATION
+LIBCTF
 OBJDUMP_PRIVATE_OFILES
 OBJDUMP_DEFS
 BUILD_INSTALL_MISC
@@ -11523,7 +11524,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11526 "configure"
+#line 11527 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11629,7 +11630,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11632 "configure"
+#line 11633 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
     fi
 done
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libctf support" >&5
+$as_echo_n "checking for libctf support... " >&6; }
+case "${target}" in
+  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)
+    if ${bu_cv_libctf_support+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  bu_cv_libctf_support=no
+fi
+
+    ;;
+  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)
+    if ${bu_cv_libctf_support+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  bu_cv_libctf_support=no
+fi
+
+    ;;
+  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)
+    if ${bu_cv_libctf_support+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  bu_cv_libctf_support=no
+fi
+
+    ;;
+  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)
+    if ${bu_cv_libctf_support+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  bu_cv_libctf_support=no
+fi
+
+    ;;
+  *)
+    if ${bu_cv_libctf_support+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  bu_cv_libctf_support=yes
+fi
+
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bu_cv_libctf_support" >&5
+$as_echo "$bu_cv_libctf_support" >&6; }
+if test $bu_cv_libctf_support = yes; then
+
+$as_echo "#define HAVE_LIBCTF 1" >>confdefs.h
+
+fi
+LIBCTF=
+if test $bu_cv_libctf_support = yes; then
+  LIBCTF=../libctf/libctf.a
+fi
+
+
 # Uniq objdump private vector, build objdump target ofiles.
 od_files=
 f=""
@@ -15140,6 +15199,7 @@ OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECT
 
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define TARGET "${target}"
 _ACEOF
index b1cd4552f2db68e5166fc8030153f59ef34b5a3b..71be51e6a6f2c4de59adef1b9765fad841c3d780 100644 (file)
@@ -393,6 +393,35 @@ changequote([,])dnl
     fi
 done
 
+
+AC_MSG_CHECKING([for libctf support])
+case "${target}" in
+  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)
+    AC_CACHE_VAL(bu_cv_libctf_support, bu_cv_libctf_support=no)
+    ;;
+  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)
+    AC_CACHE_VAL(bu_cv_libctf_support, bu_cv_libctf_support=no)
+    ;;
+  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)
+    AC_CACHE_VAL(bu_cv_libctf_support, bu_cv_libctf_support=no)
+    ;;
+  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)
+    AC_CACHE_VAL(bu_cv_libctf_support, bu_cv_libctf_support=no)
+    ;;
+  *)
+    AC_CACHE_VAL(bu_cv_libctf_support, bu_cv_libctf_support=yes)
+  ;;      
+esac
+AC_MSG_RESULT($bu_cv_libctf_support)
+if test $bu_cv_libctf_support = yes; then
+  AC_DEFINE(HAVE_LIBCTF, 1, [Is libctf available?])
+fi
+LIBCTF=
+if test $bu_cv_libctf_support = yes; then
+  LIBCTF=../libctf/libctf.a
+fi
+
+
 # Uniq objdump private vector, build objdump target ofiles.
 od_files=
 f=""
@@ -449,6 +478,7 @@ AC_SUBST(BUILD_MISC)
 AC_SUBST(BUILD_INSTALL_MISC)
 AC_SUBST(OBJDUMP_DEFS)
 AC_SUBST(OBJDUMP_PRIVATE_OFILES)
+AC_SUBST(LIBCTF)
 
 AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
 
index 7fa622a364935dad2dfef7103c5000b9a1ede678..d7cd4b08fcc402b416164fd7108a01cf957e7fb6 100644 (file)
@@ -285,6 +285,7 @@ LDFLAGS = @LDFLAGS@
 LEX = @LEX@
 LEXLIB = @LEXLIB@
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCTF = @LIBCTF@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBINTL_DEP = @LIBINTL_DEP@
index 156331b502ee332043c70100686d11c3c71e9d64..382ba35855cf9e06cba880c8d35cd8127d66b1b3 100644 (file)
@@ -56,7 +56,9 @@
 #include "bucomm.h"
 #include "elfcomm.h"
 #include "dwarf.h"
+#ifdef HAVE_LIBCTF
 #include "ctf-api.h"
+#endif
 #include "getopt.h"
 #include "safe-ctype.h"
 #include "dis-asm.h"
@@ -99,9 +101,11 @@ static bfd_boolean with_source_code;        /* -S */
 static int show_raw_insn;              /* --show-raw-insn */
 static int dump_dwarf_section_info;    /* --dwarf */
 static int dump_stab_section_info;     /* --stabs */
+#ifdef HAVE_LIBCTF
 static int dump_ctf_section_info;       /* --ctf */
 static char *dump_ctf_section_name;
 static char *dump_ctf_parent_name;     /* --ctf-parent */
+#endif
 static int do_demangle;                        /* -C, --demangle */
 static bfd_boolean disassemble;                /* -d */
 static bfd_boolean disassemble_all;    /* -D */
@@ -228,8 +232,12 @@ usage (FILE *stream, int status)
           =frames-interp,=str,=loc,=Ranges,=pubtypes,\n\
           =gdb_index,=trace_info,=trace_abbrev,=trace_aranges,\n\
           =addr,=cu_index,=links,=follow-links]\n\
-                           Display DWARF info in the file\n\
-  --ctf=SECTION            Display CTF info from SECTION\n\
+                           Display DWARF info in the file\n"));
+#ifdef HAVE_LIBCTF
+  fprintf (stream, _("\
+  --ctf=SECTION            Display CTF info from SECTION\n"));
+#endif
+  fprintf (stream, _("\
   -t, --syms               Display the contents of the symbol table(s)\n\
   -T, --dynamic-syms       Display the contents of the dynamic symbol table\n\
   -r, --reloc              Display the relocation entries in the file\n\
@@ -278,8 +286,11 @@ usage (FILE *stream, int status)
       --dwarf-start=N        Display DIEs starting with N, at the same depth\n\
                              or deeper\n\
       --dwarf-check          Make additional dwarf internal consistency checks.\
-      \n\
+      \n"));
+#ifdef HAVE_LIBCTF
+      fprintf (stream, _("\
       --ctf-parent=SECTION     Use SECTION as the CTF parent\n\n"));
+#endif
       list_supported_targets (program_name, stream);
       list_supported_architectures (program_name, stream);
 
@@ -314,9 +325,11 @@ enum option_values
     OPTION_DWARF_START,
     OPTION_RECURSE_LIMIT,
     OPTION_NO_RECURSE_LIMIT,
-    OPTION_INLINES,
+#ifdef HAVE_LIBCTF
     OPTION_CTF,
-    OPTION_CTF_PARENT
+    OPTION_CTF_PARENT,
+#endif
+    OPTION_INLINES
   };
 
 static struct option long_options[]=
@@ -359,8 +372,10 @@ static struct option long_options[]=
   {"special-syms", no_argument, &dump_special_syms, 1},
   {"include", required_argument, NULL, 'I'},
   {"dwarf", optional_argument, NULL, OPTION_DWARF},
+#ifdef HAVE_LIBCTF
   {"ctf", required_argument, NULL, OPTION_CTF},
   {"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
+#endif
   {"stabs", no_argument, NULL, 'G'},
   {"start-address", required_argument, NULL, OPTION_START_ADDRESS},
   {"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
@@ -3199,6 +3214,7 @@ dump_bfd_header (bfd *abfd)
 }
 \f
 
+#ifdef HAVE_LIBCTF
 /* Formatting callback function passed to ctf_dump.  Returns either the pointer
    it is passed, or a pointer to newly-allocated storage, in which case
    dump_ctf() will free it when it no longer needs it.  */
@@ -3216,6 +3232,7 @@ dump_ctf_indent_lines (ctf_sect_names_t sect ATTRIBUTE_UNUSED,
 }
 
 /* Make a ctfsect suitable for ctf_bfdopen_ctfsect().  */
+
 static ctf_sect_t
 make_ctfsect (const char *name, bfd_byte *data,
              bfd_size_type size)
@@ -3331,8 +3348,8 @@ dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
   free (parentdata);
   free (ctfdata);
 }
+#endif /* HAVE_LIBCTF */
 
-\f
 static void
 dump_bfd_private_header (bfd *abfd)
 {
@@ -4043,8 +4060,10 @@ dump_bfd (bfd *abfd, bfd_boolean is_mainfile)
     dump_symbols (abfd, TRUE);
   if (dump_dwarf_section_info)
     dump_dwarf (abfd);
+#ifdef HAVE_LIBCTF
   if (dump_ctf_section_info)
     dump_ctf (abfd, dump_ctf_section_name, dump_ctf_parent_name);
+#endif
   if (dump_stab_section_info)
     dump_stabs (abfd);
   if (dump_reloc_info && ! disassemble)
@@ -4484,6 +4503,7 @@ main (int argc, char **argv)
        case OPTION_DWARF_CHECK:
          dwarf_check = TRUE;
          break;
+#ifdef HAVE_LIBCTF
         case OPTION_CTF:
           dump_ctf_section_info = TRUE;
           dump_ctf_section_name = xstrdup (optarg);
@@ -4492,6 +4512,7 @@ main (int argc, char **argv)
        case OPTION_CTF_PARENT:
          dump_ctf_parent_name = xstrdup (optarg);
          break;
+#endif
        case 'G':
          dump_stab_section_info = TRUE;
          seenflag = TRUE;
@@ -4551,9 +4572,10 @@ main (int argc, char **argv)
     }
 
   free_only_list ();
+#ifdef HAVE_LIBCTF
   free (dump_ctf_section_name);
   free (dump_ctf_parent_name);
-
+#endif
   END_PROGRESS (program_name);
 
   return exit_status;
index 5ae58574fb4cfa41479699006585b0140cd9a6b8..2615e8bc87ec073c7c0632f3ebbdb8726e59fe21 100644 (file)
@@ -60,7 +60,9 @@
 #include "bucomm.h"
 #include "elfcomm.h"
 #include "dwarf.h"
+#ifdef HAVE_LIBCTF
 #include "ctf-api.h"
+#endif
 
 #include "elf/common.h"
 #include "elf/external.h"
@@ -184,7 +186,9 @@ typedef struct elf_section_list
 #define DEBUG_DUMP     (1 << 2)        /* The -w command line switch.  */
 #define STRING_DUMP     (1 << 3)       /* The -p command line switch.  */
 #define RELOC_DUMP      (1 << 4)       /* The -R command line switch.  */
+#ifdef HAVE_LIBCTF
 #define CTF_DUMP        (1 << 5)        /* The --ctf command line switch.  */
+#endif
 
 typedef unsigned char dump_type;
 
@@ -251,16 +255,20 @@ static bfd_boolean do_dump = FALSE;
 static bfd_boolean do_version = FALSE;
 static bfd_boolean do_histogram = FALSE;
 static bfd_boolean do_debugging = FALSE;
+#ifdef HAVE_LIBCTF
 static bfd_boolean do_ctf = FALSE;
+#endif
 static bfd_boolean do_arch = FALSE;
 static bfd_boolean do_notes = FALSE;
 static bfd_boolean do_archive_index = FALSE;
 static bfd_boolean is_32bit_elf = FALSE;
 static bfd_boolean decompress_dumps = FALSE;
 
+#ifdef HAVE_LIBCTF
 static char *dump_ctf_parent_name;
 static char *dump_ctf_symtab_name;
 static char *dump_ctf_strtab_name;
+#endif
 
 struct group_list
 {
@@ -4401,10 +4409,12 @@ get_section_type_name (Filedata * filedata, unsigned int sh_type)
 #define OPTION_DWARF_DEPTH     514
 #define OPTION_DWARF_START     515
 #define OPTION_DWARF_CHECK     516
+#ifdef HAVE_LIBCTF
 #define OPTION_CTF_DUMP                517
 #define OPTION_CTF_PARENT      518
 #define OPTION_CTF_SYMBOLS     519
 #define OPTION_CTF_STRINGS     520
+#endif
 
 static struct option options[] =
 {
@@ -4443,11 +4453,13 @@ static struct option options[] =
   {"dwarf-start",      required_argument, 0, OPTION_DWARF_START},
   {"dwarf-check",      no_argument, 0, OPTION_DWARF_CHECK},
 
+#ifdef HAVE_LIBCTF
   {"ctf",              required_argument, 0, OPTION_CTF_DUMP},
 
   {"ctf-symbols",      required_argument, 0, OPTION_CTF_SYMBOLS},
   {"ctf-strings",      required_argument, 0, OPTION_CTF_STRINGS},
   {"ctf-parent",       required_argument, 0, OPTION_CTF_PARENT},
+#endif
 
   {"version",         no_argument, 0, 'v'},
   {"wide",            no_argument, 0, 'W'},
@@ -4498,6 +4510,7 @@ usage (FILE * stream)
   --dwarf-depth=N        Do not display DIEs at depth N or greater\n\
   --dwarf-start=N        Display DIEs starting with N, at the same depth\n\
                          or deeper\n"));
+#ifdef HAVE_LIBCTF
   fprintf (stream, _("\
   --ctf=<number|name>    Display CTF info from section <number|name>\n\
   --ctf-parent=<number|name>\n\
@@ -4506,6 +4519,7 @@ usage (FILE * stream)
                          Use section <number|name> as the CTF external symtab\n\n\
   --ctf-strings=<number|name>\n\
                          Use section <number|name> as the CTF external strtab\n\n"));
+#endif
 
 #ifdef SUPPORT_DISASSEMBLY
   fprintf (stream, _("\
@@ -4734,6 +4748,7 @@ parse_args (Filedata * filedata, int argc, char ** argv)
        case OPTION_DWARF_CHECK:
          dwarf_check = TRUE;
          break;
+#ifdef HAVE_LIBCTF
        case OPTION_CTF_DUMP:
          do_ctf = TRUE;
          request_dump (filedata, CTF_DUMP);
@@ -4747,6 +4762,7 @@ parse_args (Filedata * filedata, int argc, char ** argv)
        case OPTION_CTF_PARENT:
          dump_ctf_parent_name = strdup (optarg);
          break;
+#endif
        case OPTION_DYN_SYMS:
          do_dyn_syms = TRUE;
          break;
@@ -13808,10 +13824,11 @@ dump_section_as_bytes (Elf_Internal_Shdr *  section,
   return TRUE;
 }
 
+#ifdef HAVE_LIBCTF
 static ctf_sect_t *
 shdr_to_ctf_sect (ctf_sect_t *buf, Elf_Internal_Shdr *shdr, Filedata *filedata)
 {
-  buf->cts_name = SECTION_NAME(shdr);
+  buf->cts_name = SECTION_NAME (shdr);
   buf->cts_type = shdr->sh_type;
   buf->cts_flags = shdr->sh_flags;
   buf->cts_size = shdr->sh_size;
@@ -13964,6 +13981,7 @@ dump_section_as_ctf (Elf_Internal_Shdr * section, Filedata * filedata)
   free (strdata);
   return ret;
 }
+#endif /* HAVE_LIBCTF */
 
 static bfd_boolean
 load_specific_debug_section (enum dwarf_section_display_enum  debug,
@@ -14303,11 +14321,13 @@ process_section_contents (Filedata * filedata)
            res = FALSE;
        }
 
+#ifdef HAVE_LIBCTF
       if (dump & CTF_DUMP)
        {
          if (! dump_section_as_ctf (section, filedata))
            res = FALSE;
        }
+#endif
     }
 
   /* Check to see if the user requested a
@@ -20187,9 +20207,11 @@ main (int argc, char ** argv)
   if (cmdline.dump_sects != NULL)
     free (cmdline.dump_sects);
 
+#ifdef HAVE_LIBCTF
   free (dump_ctf_symtab_name);
   free (dump_ctf_strtab_name);
   free (dump_ctf_parent_name);
+#endif
 
   return err ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index 3e95ce50ffb15a53e3d7aa66515937d1bd22d43c..86dc0407fa0ad70e1e50029e29a15dadb8c6a246 100755 (executable)
--- a/configure
+++ b/configure
@@ -3604,6 +3604,22 @@ case "${target}" in
     ;;
 esac
 
+# Targets that do not use the ELF file format cannot support libctf.
+case "${target}" in
+  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+esac
+
 case "${target}" in
   *-*-chorusos)
     ;;
index c84263c516bc9131565fbaaf4d17d2e77bd9aa8f..c205698cd6be55f2a08a8cf7f3298e177930b660 100644 (file)
@@ -901,6 +901,22 @@ case "${target}" in
     ;;
 esac
 
+# Targets that do not use the ELF file format cannot support libctf.
+case "${target}" in
+  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+esac
+
 case "${target}" in
   *-*-chorusos)
     ;;