From dee9979493130df7a1cc1cf7b53d5ca2229f6105 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Oct 1996 21:36:08 +0000 Subject: [PATCH] * configure.in: Add havevecs, and put it in tdefaults. * mpw-config.in: Likewise. * configure: Rebuild. * targmatch.sed: New file; a sed script to build targmatch.h from config.bfd. * config.bfd: Add #if, #endif, and comments for targmatch.h. * targets.c: Include "fnmatch.h". (struct targmatch): Define. (bfd_target_match): Define by including targmatch.h. (bfd_find_target): If the target is not found by name, search for it as a configuration triplet. * Makefile.in: Rebuild dependencies. (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o, i386dynix.o, m68k4knetbsd.o, and riscix.o. (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c, hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c. (HFILES): Add targmatch.h. Also, alphabetize and reindent. (CFILES): Remove i386dynix.c and hp300bsd.c. (targmatch.h): New target. (do_clean): Remove targmatch.h. * configure.in: Add BFD_NEED_DECLARATION(getenv). * acconfig.h: Add NEED_DECLARATION_GETENV. * configure, config.in: Rebuild. * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv. * aout-adobe.c (aout_adobe_object_p): Don't declare getenv. --- bfd/.Sanitize | 1 + bfd/ChangeLog | 29 +++++++++++++++++++ bfd/Makefile.in | 72 ++++++++++++++++++++++++++++++++++------------- bfd/acconfig.h | 3 ++ bfd/config.bfd | 26 +++++++++++------ bfd/configure | 68 ++++++++++++++++++++++++++++++++++++++------ bfd/mpw-config.in | 8 +++++- bfd/targmatch.sed | 17 +++++++++++ 8 files changed, 188 insertions(+), 36 deletions(-) create mode 100644 bfd/targmatch.sed diff --git a/bfd/.Sanitize b/bfd/.Sanitize index 14662f1fbed..e21a612af9e 100644 --- a/bfd/.Sanitize +++ b/bfd/.Sanitize @@ -280,6 +280,7 @@ sunos.c syms.c sysdep.h targets.c +targmatch.sed tekhex.c trad-core.c versados.c diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6b76ef4bbd1..b37530d2a54 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,32 @@ +Thu Oct 3 16:57:51 1996 Ian Lance Taylor + + * configure.in: Add havevecs, and put it in tdefaults. + * mpw-config.in: Likewise. + * configure: Rebuild. + * targmatch.sed: New file; a sed script to build targmatch.h from + config.bfd. + * config.bfd: Add #if, #endif, and comments for targmatch.h. + * targets.c: Include "fnmatch.h". + (struct targmatch): Define. + (bfd_target_match): Define by including targmatch.h. + (bfd_find_target): If the target is not found by name, search for + it as a configuration triplet. + * Makefile.in: Rebuild dependencies. + (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o, + i386dynix.o, m68k4knetbsd.o, and riscix.o. + (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c, + hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c. + (HFILES): Add targmatch.h. Also, alphabetize and reindent. + (CFILES): Remove i386dynix.c and hp300bsd.c. + (targmatch.h): New target. + (do_clean): Remove targmatch.h. + + * configure.in: Add BFD_NEED_DECLARATION(getenv). + * acconfig.h: Add NEED_DECLARATION_GETENV. + * configure, config.in: Rebuild. + * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv. + * aout-adobe.c (aout_adobe_object_p): Don't declare getenv. + Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com) * cpu-mn10x00.c, elf32-mn10x00: Removed. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 5cbc4369b63..2286c6617d8 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -173,7 +173,9 @@ ALL_MACHINES_CFILES = \ # target_vector in targets.c if configured with --enable-targets=all. BFD32_BACKENDS = \ aout-adobe.o \ + aout-arm.o \ aout-ns32k.o \ + aout-sparcle.o \ aout0.o \ aout32.o \ bout.o \ @@ -225,12 +227,17 @@ BFD32_BACKENDS = \ elf32-ppc.o \ elf32-sh.o \ elf32-sparc.o \ + $(start-sanitize-v850) \ + elf32-v850.o \ + $(end-sanitize-v850) \ elf32.o \ elflink.o \ + hp300bsd.o \ hp300hpux.o \ som.o \ i386aout.o \ i386bsd.o \ + i386dynix.o \ i386freebsd.o \ i386linux.o \ i386lynx.o \ @@ -239,6 +246,7 @@ BFD32_BACKENDS = \ i386mach3.o \ i386os9k.o \ ieee.o \ + m68k4knetbsd.o \ m68klinux.o \ m68klynx.o \ m68knetbsd.o \ @@ -261,6 +269,7 @@ BFD32_BACKENDS = \ pei-ppc.o \ ppcboot.o \ reloc16.o \ + riscix.o \ sparclynx.o \ sparcnetbsd.o \ sunos.o \ @@ -270,7 +279,9 @@ BFD32_BACKENDS = \ BFD32_BACKENDS_CFILES = \ aout-adobe.c \ + aout-arm.c \ aout-ns32k.c \ + aout-sparcle.c \ aout0.c \ aout32.c \ bout.c \ @@ -313,10 +324,12 @@ BFD32_BACKENDS_CFILES = \ elf32-sparc.c \ elf32.c \ elflink.c \ + hp300bsd.c \ hp300hpux.c \ som.c \ i386aout.c \ i386bsd.c \ + i386dynix.c \ i386freebsd.c \ i386linux.c \ i386lynx.c \ @@ -325,6 +338,7 @@ BFD32_BACKENDS_CFILES = \ i386mach3.c \ i386os9k.c \ ieee.c \ + m68k4knetbsd.c \ m68klinux.c \ m68klynx.c \ m68knetbsd.c \ @@ -347,6 +361,7 @@ BFD32_BACKENDS_CFILES = \ pei-ppc.c \ ppcboot.c \ reloc16.c \ + riscix.c \ sparclynx.c \ sparcnetbsd.c \ sunos.c \ @@ -452,14 +467,15 @@ CFILES = \ $(ALL_MACHINES_CFILES) \ $(BFD32_BACKENDS_CFILES) \ $(BFD64_BACKENDS_CFILES) \ - $(OPTIONAL_BACKENDS_CFILES) \ - i386dynix.c hp300bsd.c + $(OPTIONAL_BACKENDS_CFILES) -HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \ - coffswap.h ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \ - elfcode.h evax.h hppa_stubs.h libaout.h libbfd.h \ - libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h libnlm.h \ - liboasys.h nlm-target.h nlmcode.h som.h genlink.h netbsd.h ns32k.h +HFILES = \ + aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \ + ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \ + elfcode.h evax.h genlink.h hppa_stubs.h libaout.h libbfd.h \ + libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h libnlm.h \ + liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \ + targmatch.h all: Makefile $(ALLLIBS) @PICLIST@ @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) @@ -550,6 +566,14 @@ stamp-tshlink: $(SHLIB) else true; fi touch stamp-tshlink +# This file holds an array associating configuration triplets and +# vector names. It is built from config.bfd. It is not compiled by +# itself, but is included by targets.c. +targmatch.h: config.bfd targmatch.sed + rm -f targmatch.h + sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new + mv -f targmatch.new targmatch.h + # When compiling archures.c and targets.c, supply the default target # info from configure. @@ -594,7 +618,7 @@ do_mostlyclean: do_clean: do_mostlyclean rm -f libbfd.a TAGS bfd.h stmp-bfd.h bfd-tmp.h ofiles stamp-ofiles \ elf32-target.h elf64-target.h $(SHLIB) $(SHLINK) \ - piclist stamp-piclist + piclist stamp-piclist targmatch.h do_distclean: do_clean rm -f Makefile config.status config.cache config.h config.log \ stamp-h bfd-in3.h @@ -874,7 +898,7 @@ reloc.o: reloc.c $(INCDIR)/bfdlink.h section.o: section.c syms.o: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def -targets.o: targets.c +targets.o: targets.c $(INCDIR)/fnmatch.h targmatch.h hash.o: hash.c linker.o: linker.c $(INCDIR)/bfdlink.h genlink.h elf.o: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ @@ -909,11 +933,15 @@ cpu-w65.o: cpu-w65.c cpu-z8k.o: cpu-z8k.c aout-adobe.o: aout-adobe.c $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/bfdlink.h +aout-arm.o: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h aout-ns32k.o: aout-ns32k.c $(INCDIR)/aout/aout64.h \ ns32k.h libaout.h $(INCDIR)/bfdlink.h -aout-sparcle.o: aout-sparcle.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ - $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h +aout-sparcle.o: aout-sparcle.c $(INCDIR)/bfdlink.h \ + libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h aout0.o: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h @@ -1031,6 +1059,9 @@ elf32.o: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \ elfcore.h elflink.h elflink.o: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h +hp300bsd.o: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \ + aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h hp300hpux.o: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ @@ -1042,6 +1073,10 @@ i386aout.o: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \ i386bsd.o: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386dynix.o: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ + $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h i386freebsd.o: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h @@ -1061,6 +1096,9 @@ i386mach3.o: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ i386os9k.o: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \ $(INCDIR)/os9k.h ieee.o: ieee.c $(INCDIR)/ieee.h libieee.h +m68k4knetbsd.o: m68k4knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ + aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h m68klinux.o: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ $(INCDIR)/bfdlink.h aout-target.h @@ -1120,6 +1158,9 @@ pei-ppc.o: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \ ppcboot.o: ppcboot.c reloc16.o: reloc16.c $(INCDIR)/bfdlink.h genlink.h \ $(INCDIR)/coff/internal.h libcoff.h +riscix.o: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h sparclynx.o: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h @@ -1181,11 +1222,4 @@ lynx-core.o: lynx-core.c osf-core.o: osf-core.c trad-core.o: trad-core.c libaout.h $(INCDIR)/bfdlink.h cisco-core.o: cisco-core.c -i386dynix.o: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -hp300bsd.o: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/bfd/acconfig.h b/bfd/acconfig.h index 496c0ae4ca9..f3c4e998014 100644 --- a/bfd/acconfig.h +++ b/bfd/acconfig.h @@ -10,6 +10,9 @@ /* Whether free must be declared even if is included. */ #undef NEED_DECLARATION_FREE + +/* Whether getenv must be declared even if is included. */ +#undef NEED_DECLARATION_GETENV @TOP@ /* Do we need to use the b modifier when opening binary files? */ diff --git a/bfd/config.bfd b/bfd/config.bfd index 7c9b4ee395f..c876ea71dfe 100755 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -9,6 +9,10 @@ # targ_cflags $(CFLAGS) for this target (FIXME: pretty bogus) # targ_undercore Whether underscores are used: yes or no +# Part of this file is processed by targmatch.sed to generate the +# targmatch.h file. The #ifdef and #endif lines that appear below are +# copied directly into targmatch.h. + # The binutils c++filt program wants to know whether underscores are # stripped or not. That is why we set targ_underscore. c++filt uses # this information to choose a default. This information is @@ -43,6 +47,8 @@ esac # convention, else the table becomes a real mess to understand and maintain. case "${targ}" in +# START OF targmatch.h +#ifdef BFD64 alpha-*-netware*) targ_defvec=ecoffalpha_little_vec targ_selvecs=nlm32_alpha_vec @@ -61,6 +67,7 @@ case "${targ}" in alpha-*-*) targ_defvec=ecoffalpha_little_vec ;; +#endif /* BFD64 */ # start-sanitize-arc arc-*-elf*) @@ -120,6 +127,7 @@ case "${targ}" in hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4*) targ_defvec=bfd_elf32_hppa_vec ;; +#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) hppa*-*-bsd*) targ_defvec=som_vec targ_selvecs=bfd_elf32_hppa_vec @@ -131,6 +139,7 @@ case "${targ}" in targ_defvec=som_vec targ_selvecs=bfd_elf32_hppa_vec ;; +#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */ i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \ i[3456]86-*-elf | i[3456]86-*-sco*elf* | i[3456]86-*-freebsdelf* | \ @@ -475,10 +484,12 @@ case "${targ}" in targ_defvec=sunos_big_vec targ_underscore=yes ;; +#ifdef BFD64 sparc64-*-elf*) targ_defvec=bfd_elf64_sparc_vec targ_selvecs=bfd_elf32_sparc_vec ;; +#endif /* BFD64 */ sparc-*-netware*) targ_defvec=bfd_elf32_sparc_vec targ_selvecs="nlm32_sparc_vec sunos_big_vec" @@ -491,10 +502,12 @@ case "${targ}" in targ_underscore=yes ;; +#if 0 tahoe-*-*) targ_defvec=host_aout_vec targ_underscore=yes ;; +#endif # start-sanitize-v850 v850-*-*) @@ -502,15 +515,12 @@ case "${targ}" in ;; # end-sanitize-v850 - vax-*-vms*) - echo 1>&2 "*** BFD does not support target ${targ}." - echo 1>&2 "*** Look in bfd/config.bfd for supported targets." - exit 1 - ;; - vax-*-*) +#if 0 + vax-*-bsd* | vax-*-ultrix*) targ_defvec=host_aout_vec targ_underscore=yes ;; +#endif we32k-*-*) targ_defvec=we32kcoff_vec @@ -530,7 +540,7 @@ case "${targ}" in ;; *-adobe-*) - targ_defvec=a_aout_adobe_vec + targ_defvec=a_out_adobe_vec targ_underscore=yes ;; @@ -543,7 +553,7 @@ case "${targ}" in targ_defvec=m68kcoff_vec targ_selvecs=ieee_vec ;; - +# END OF targmatch.h *) echo 1>&2 "*** BFD does not support target ${targ}." echo 1>&2 "*** Look in bfd/config.bfd for supported targets." diff --git a/bfd/configure b/bfd/configure index d655f1a1ad9..36298849759 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1530,6 +1530,53 @@ EOF fi +echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +int main() { return 0; } +int t() { +char *(*pfn) = (char *(*)) getenv +; return 0; } +EOF +if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no +else + rm -rf conftest* + bfd_cv_decl_needed_getenv=yes +fi +rm -f conftest* + +fi + +echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 +if test $bfd_cv_decl_needed_getenv = yes; then + bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1790,7 +1837,7 @@ int t() { prstatus_t t; ; return 0; } EOF -if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_header_sys_procfs_h=yes else @@ -2052,9 +2099,13 @@ if test x${all_targets} = xtrue ; then bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' selvecs= + havevecs= selarchs= else # all_targets is true # Only set these if they will be nonempty, for the clever echo. + havevecs= + test -n "$selvecs" && + havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` test -n "$selvecs" && selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` test -n "$selarchs" && @@ -2085,6 +2136,7 @@ tdefaults="" test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" +test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" for ac_func in valloc getpagesize @@ -2094,7 +2146,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2148,7 +2200,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_mmap=yes else @@ -2242,7 +2294,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/bfd/mpw-config.in b/bfd/mpw-config.in index cbd13dbbe69..31addeebdcf 100644 --- a/bfd/mpw-config.in +++ b/bfd/mpw-config.in @@ -5,37 +5,43 @@ Set selarchs "&bfd_{target_cpu}_arch" Set defvec "" Set selvecs "" +Set havevecs "" If "{target_canonical}" =~ /m68k-apple-macos/ Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o' Set defvec m68kcoff_vec Set selvecs '&m68kcoff_vec' + Set havevecs '-d HAVE_m68kcoff_vec' Else If "{target_canonical}" =~ /powerpc-apple-macos/ Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o' Set defvec pmac_xcoff_vec Set selvecs '&pmac_xcoff_vec' + Set havevecs '-d HAVE_pmac_xcoff_vec' Set selarchs "&bfd_powerpc_arch" Else If "{target_canonical}" =~ /i386-\Option-x-go32/ Set BFD_BACKENDS '"{o}"coff-i386.c.o' Set defvec i386coff_vec Set selvecs '&i386coff_vec' + Set havevecs '-d HAVE_i386coff_vec' Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/ Set BFD_BACKENDS '"{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o "{o}"elf32.c.o "{o}"elf32-mips.c.o "{o}"elflink.c.o' Set defvec ecoff_big_vec Set selvecs '&ecoff_big_vec,&ecoff_little_vec,&bfd_elf32_bigmips_vec' + Set havevecs '-d HAVE_ecoff_big_vec -d HAVE_ecoff_little_vec -d HAVE_bfd_elf32_bigmips_vec' Else If "{target_canonical}" =~ /sh-\Option-x-hms/ Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o' Set defvec shcoff_vec Set selvecs '&shcoff_vec,&shlcoff_vec' + Set havevecs '-d HAVE_shcoff_vec -d HAVE_shlcoff_vec' End If Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'` -Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs}" +Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs} {havevecs}" Echo '# From mpw-config.in' > "{o}"mk.tmp Echo 'WORDSIZE = 32' >> "{o}"mk.tmp diff --git a/bfd/targmatch.sed b/bfd/targmatch.sed new file mode 100644 index 00000000000..f681aac4b9e --- /dev/null +++ b/bfd/targmatch.sed @@ -0,0 +1,17 @@ +1,/START OF targmatch.h/ d +/END OF targmatch.h/,$ d +s/^#if/KEEP #if/ +s/^#endif/KEEP #endif/ +s/^[ ]*#.*$// +s/^KEEP #/#/ +s/[ ]*\\$// +s/[| ][| ]*\([^|() ][^|() ]*\)[ ]*\|/{ "\1", NULL },/g +s/[| ][| ]*\([^|() ][^|() ]*\)[ ]*)/{ "\1",/g +s/^[ ]*targ_defvec=\([^ ]*\)/#if !defined (SELECT_VECS) || defined (HAVE_\1)\ +\&\1\ +#else\ +UNSUPPORTED_TARGET\ +#endif\ +},/ +s/.*=.*// +s/;;// -- 2.30.2