diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-04 18:31:40 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-04 18:31:40 +0000 |
commit | 2b79a10471177329465a195f19440a8c8dbbb8ff (patch) | |
tree | be5b500c7f75d94761b3764228638a1dda51eda7 /bfd | |
parent | c62d12746b2f1bfcf38fa7de6ded9287e751e927 (diff) | |
download | gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.zip gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.tar.gz gdb-2b79a10471177329465a195f19440a8c8dbbb8ff.tar.bz2 |
* config.bfd: Rewrite to incorporate the contents of the Makefile
fragments by setting shell variables, rather than merely returning
the name of a Makefile fragment.
* configure.in: Use shell variables set by config.bfd rather than
looking at the target Makefile fragment files. Don't substitute
target_makefile_frag. Do substitute TDEFINES.
* configure: Rebuild.
* Makefile.in (@target_makefile_frag@): Remove.
(ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
* config/*.mt: Remove.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 13 | ||||
-rw-r--r-- | bfd/Makefile.in | 3 | ||||
-rwxr-xr-x | bfd/config.bfd | 600 | ||||
-rwxr-xr-x | bfd/configure | 86 | ||||
-rw-r--r-- | bfd/configure.in | 85 |
5 files changed, 506 insertions, 281 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a8d00aa..77b9bb5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com> + + * config.bfd: Rewrite to incorporate the contents of the Makefile + fragments by setting shell variables, rather than merely returning + the name of a Makefile fragment. + * configure.in: Use shell variables set by config.bfd rather than + looking at the target Makefile fragment files. Don't substitute + target_makefile_frag. Do substitute TDEFINES. + * configure: Rebuild. + * Makefile.in (@target_makefile_frag@): Remove. + (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@. + * config/*.mt: Remove. + Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com> * configure.in: Put changequote lines around "i[345]86" patterns diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 5dc6fb4..feb11f0 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -234,7 +234,6 @@ TDEFAULTS = @tdefaults@ all: #### host and target dependent Makefile fragments come in here. -# @target_makefile_frag@ # @host_makefile_frag@ ### @@ -254,7 +253,7 @@ FLAGS_TO_PASS = \ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ "BISON=$(BISON)" -ALL_CFLAGS=$(CFLAGS) $(HDEFINES) @COREFLAG@ $(TDEFINES) $(CSEARCH) $(CSWITCHES) +ALL_CFLAGS=$(CFLAGS) $(HDEFINES) @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) .c.o: $(CC) -c $(ALL_CFLAGS) $< diff --git a/bfd/config.bfd b/bfd/config.bfd index 249be6e..3f2e954 100755 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1,187 +1,445 @@ -#!/bin/sh - # config.bfd # Convert a canonical host type into a BFD host type. -# Call with canonical name as the argument. -# Echos the result. -# If second argument is _, echoes whether underscores are stripped. - -canon="$1" -cpu=`echo $canon | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +# Set shell variable targ to canonical target name, and run +# using ``. config.bfd''. +# Sets the following shell variables: +# targ_defvec Default vector for this target +# targ_selvecs Vectors to build for this target +# targ_archs Architectures for this target +# targ_cflags $(CFLAGS) for this target (FIXME: pretty bogus) +# targ_undercore Whether underscores are used: yes or no # The binutils c++filt program wants to know whether underscores are -# stripped or not. It uses this information to choose a default. -# This information is duplicated in the symbol_leading_char field of -# the BFD target vector, but c++filt does not deal with object files -# and is not linked against libbfd.a. It is not terribly important -# that c++filt get this right; it is just convenient. -strip_underscore=no +# stripped or not. That is why we set targ_underscore. c++filt uses +# this information to choose a default. This information is +# duplicated in the symbol_leading_char field of the BFD target +# vector, but c++filt does not deal with object files and is not +# linked against libbfd.a. It is not terribly important that c++filt +# get this right; it is just convenient. + +targ_defvec= +targ_selvecs= +targ_cflags= +targ_underscore=no + +targ_cpu=`echo $targ | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +case "${targ_cpu}" in +arm*) targ_archs=bfd_arm_arch ;; +hppa*) targ_archs=bfd_hppa_arch ;; +i[345]86) targ_archs=bfd_i386_arch ;; +m68*) targ_archs=bfd_m68k_arch ;; +m88*) targ_archs=bfd_m88k_arch ;; +mips*) targ_archs=bfd_mips_arch ;; +powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +sparc*) targ_archs=bfd_sparc_arch ;; +z8k*) targ_archs=bfd_z8k_arch ;; +*) targ_archs=bfd_${targ_cpu}_arch ;; +esac # WHEN ADDING ENTRIES TO THIS MATRIX: # Make sure that the left side always has two dashes. Otherwise you # can get spurious matches. Even for unambiguous cases, do this as a # convention, else the table becomes a real mess to understand and maintain. -case "${canon}" in - alpha-*-netware*) bfd_name=alpha-nlm ;; - alpha-*-*) bfd_name=alphaosf ;; +case "${targ}" in + alpha-*-netware*) + targ_defvec=ecoffalpha_little_vec + targ_selvecs=nlm32_alpha_vec + ;; + alpha-*-*) + targ_defvec=ecoffalpha_little_vec + ;; + # start-sanitize-arc - arc-*-elf*) bfd_name=arc-elf ;; + arc-*-elf*) + targ_defvec=bfd_elf32_littlearc_vec + targ_selvecs=bfd_elf32_bigarg_vec + ;; # end-sanitize-arc - arm-*-riscix*) bfd_name=riscix ;; - arm-*-pe*) bfd_name=arm-pe strip_underscore=yes ;; + + arm-*-riscix*) + targ_defvec=riscix_vec + ;; + arm-*-pe*) + targ_defvec=armpe_little_vec + targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec" + targ_underscore=yes + ;; arm-*-aout | armel-*-aout) - bfd_name=arml-aout ;; - armeb-*-aout) bfd_name=armb-aout ;; - a29k-*-ebmon*) bfd_name=a29k-coff strip_underscore=yes ;; - a29k-*-udi*) bfd_name=a29k-coff strip_underscore=yes ;; - a29k-*-aout*) bfd_name=a29k-aout strip_underscore=yes ;; - a29k-*-coff*) bfd_name=a29k-coff strip_underscore=yes ;; - a29k-*-sym1*) bfd_name=a29k-coff strip_underscore=yes ;; - a29k-*-vxworks*) bfd_name=a29k-coff strip_underscore=yes ;; - h8300*-*-*) bfd_name=h8300-coff strip_underscore=yes ;; - h8500-*-*) bfd_name=h8500-coff strip_underscore=yes ;; - sh-*-*) bfd_name=sh-coff strip_underscore=yes ;; + targ_defvec=aout_arm_little_vec + targ_selvecs=aout_arm_big_vec + ;; + armeb-*-aout) + targ_defvec=aout_arm_big_vec + targ_selvecs=aout_arm_little_vec + ;; + + a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \ + a29k-*-vxworks* | a29k-*-sysv*) + targ_defvec=a29kcoff_big_vec + targ_selvecs=sunos_big_vec + targ_underscore=yes + ;; + a29k-*-aout* | a29k-*-bsd* | a29k-*-vsta*) + targ_defvec=sunos_big_vec + targ_underscore=yes + ;; + + h8300*-*-*) + targ_defvec=h8300coff_vec + targ_underscore=yes + ;; + + h8500-*-*) + targ_defvec=h8500coff_vec + targ_underscore=yes + ;; + + sh-*-*) + targ_selvecs="shcoff_vec shlcoff_vec" + targ_underscore=yes + ;; + # start-sanitize-rce - rce-*-aout) bfd_name=rce-aout ;; + rce-*-aout*) + targ_defvec=rce_aout_vec + ;; + # end-sanitize-rce - hppa*-*-*elf*) bfd_name=hppa-elf ;; - hppa*-*-lites*) bfd_name=hppa-elf ;; - hppa*-*-bsd*) bfd_name=hppabsd ;; - hppa*-*-hpux*) bfd_name=hppahpux ;; - hppa*-*-hiux*) bfd_name=hppahpux ;; - hppa*-*-osf*) bfd_name=hppaosf ;; - i[345]86-*-sysv4*) bfd_name=i386-elf ;; - i[345]86-*-unixware) bfd_name=i386-elf ;; - i[345]86-*-solaris2*) bfd_name=i386-elf ;; - i[345]86-*-sysv*) bfd_name=i386-coff ;; - i[345]86-*-isc*) bfd_name=i386-coff ;; - i[345]86-*-sco*) bfd_name=i386-coff ;; - i[345]86-sequent-bsd*) bfd_name=i386-dynix strip_underscore=yes ;; - i[345]86-*-bsd*) bfd_name=i386-bsd strip_underscore=yes ;; - i[345]86-*-coff) bfd_name=i386-coff ;; - i[345]86-*-aix*) bfd_name=i386-coff ;; - i[345]86-*-elf) bfd_name=i386-elf ;; - i[345]86-*-freebsd*) bfd_name=i386-bsd strip_underscore=yes ;; - i[345]86-*-netbsd*) bfd_name=i386-nbsd strip_underscore=yes ;; - i[345]86-*-netware*) bfd_name=i386-nlm ;; - i[345]86-*-linuxaout*) bfd_name=i386-laout strip_underscore=yes ;; - i[345]86-*-linux*) bfd_name=i386-linux strip_underscore=yes ;; - i[345]86-*-lynxos*) bfd_name=i386-lynx ;; - i[345]86-*-gnu*) bfd_name=i386-gelf strip_underscore=yes ;; - i[345]86-*-mach*) bfd_name=i386-mach3 strip_underscore=yes ;; - i[345]86-*-osf1mk*) bfd_name=i386-mach3 strip_underscore=yes ;; - i[345]86-*-os9k) bfd_name=i386-os9k ;; - i[345]86-*-msdos*) bfd_name=i386-msdos ;; - i[345]86-*-moss*) bfd_name=i386-moss ;; - i[345]86-*-win32) bfd_name=i386-pe ;; - i[345]86-*-winnt) bfd_name=i386-pe ;; - i[345]86-*-pe) bfd_name=i386-pe ;; - i[345]86-none-*) bfd_name=i386-coff ;; - i960-*-vxworks4*) bfd_name=i960-bout strip_underscore=yes ;; - i960-*-vxworks5.0) bfd_name=i960-bout strip_underscore=yes ;; - i960-*-vxworks5.*) bfd_name=i960-coff strip_underscore=yes ;; - i960-*-vxworks*) bfd_name=i960-bout strip_underscore=yes ;; - i960-*-aout*) bfd_name=i960-bout strip_underscore=yes ;; - i960-*-bout*) bfd_name=i960-bout strip_underscore=yes ;; - i960-*-coff*) bfd_name=i960-coff strip_underscore=yes ;; - i960-*-nindy*) bfd_name=i960-bout strip_underscore=yes ;; - m68*-apollo-*) bfd_name=apollo ;; - m68*-bull-sysv*) bfd_name=u68k-coff strip_underscore=yes ;; - m68*-hp-bsd*) bfd_name=hp300bsd strip_underscore=yes ;; - m68*-*-aout*) bfd_name=m68k-0aout strip_underscore=yes ;; - m68*-*-coff*) bfd_name=m68k-coff ;; - m68*-*-elf*) bfd_name=m68k-elf ;; - m68*-*-hpux*) bfd_name=hp300hpux strip_underscore=yes ;; - m68*-*-lynxos*) bfd_name=m68k-lynx ;; - m68*-*-netbsd*) bfd_name=m68k-nbsd strip_underscore=yes ;; - m68*-*-os68k*) bfd_name=m68k-aout strip_underscore=yes ;; - m68*-*-sunos*) bfd_name=m68k-aout strip_underscore=yes ;; - m68*-*-sysv4*) bfd_name=m68k-elf ;; - m68*-*-sysv*) bfd_name=m68k-coff ;; - m68*-*-vxworks*) bfd_name=m68k-aout strip_underscore=yes ;; - m68*-ericsson-*) bfd_name=m68k-ose strip_underscore=yes ;; - m68*-netx-*) bfd_name=m68k-aout strip_underscore=yes ;; - - m88*-harris-cxux*) bfd_name=m88k-elf ;; - # DGUX used to use COFF, but now (Jan 94) I believe it uses ELF by default. - m88*-*-dgux*) bfd_name=m88k-elf ;; - m88*-*-mach3*) bfd_name=m88k-mach3 ;; - m88*-*-sysv4*) bfd_name=m88k-elf ;; - m88*-*-*) bfd_name=m88k-coff strip_underscore=yes ;; - - mips*-big-*) bfd_name=bigmips ;; - mips*-dec-bsd*) bfd_name=mipsdecbsd strip_underscore=yes ;; - mips*-dec-mach3*) bfd_name=mips-mach3 ;; - mips*-dec-*) bfd_name=decstation ;; - mips*el-*-ecoff*) bfd_name=decstation ;; - mips*-*-ecoff*) bfd_name=bigmips ;; - mips*-*-irix5*) bfd_name=mipsbelf ;; - mips*-sgi-*) bfd_name=bigmips ;; - mips*-*-mach3*) bfd_name=mips-mach3 ;; - mips*-*-sysv4*) bfd_name=mipsbelf ;; - mips*-*-sysv*) bfd_name=riscos ;; - mips*-*-riscos*) bfd_name=riscos ;; - mips*-*-bsd*) bfd_name=bigmips ;; # Sony News -# CYGNUS LOCAL jsmith/vr4300 : we use the existing definition for little-endian - mips*vr4300-*-elf*) bfd_name=mipsbvr4300 ;; # NEC VR4300 ELF only -# END CYGNUS LOCAL - mips*el-*-elf*) bfd_name=mipslelf ;; - mips*-*-elf*) bfd_name=mipsbelf ;; - ns32k-pc532-mach*) bfd_name=pc532-mach strip_underscore=yes;; - ns32k-*-netbsd*) bfd_name=ns32k-nbsd strip_underscore=yes;; - powerpc-*-aix*) bfd_name=rs6000 ;; - powerpc-*-elf*) bfd_name=ppc-elf ;; - powerpc-*-sysv4*) bfd_name=ppc-elf ;; - powerpc-*-eabi*) bfd_name=ppc-elf ;; - powerpc-*-netware*) bfd_name=ppc-nlm ;; - powerpcle-*-elf*) bfd_name=ppcle-elf ;; - powerpcle-*-sysv4*) bfd_name=ppcle-elf ;; - powerpcle-*-eabi*) bfd_name=ppcle-elf ;; - rs6000-*-*) bfd_name=rs6000 ;; - sparc-*-lynxos*) bfd_name=sparc-lynx ;; - sparc-*-netbsd*) bfd_name=sparc-nbsd strip_underscore=yes;; - sparc-*-solaris2*) bfd_name=sparc-elf ;; - sparc-*-sysv4*) bfd_name=sparc-elf ;; - sparc64-*-aout*) bfd_name=sparc-aout strip_underscore=yes ;; - sparc64-*-elf*) bfd_name=sparc64-elf ;; - sparc-*-netware*) bfd_name=sparc-nlm ;; - sparc*-*-coff*) bfd_name=sparc-coff ;; - sparc*-*-*) bfd_name=sparc-aout strip_underscore=yes ;; - tahoe-*-*) bfd_name=tahoe strip_underscore=yes ;; - vax-*-vms*) bfd_name=vax-vms ;; - vax-*-*) bfd_name=vax strip_underscore=yes ;; - we32k-*-*) bfd_name=we32k ;; - w65-*-*) bfd_name=w65 ;; - z8k*-*-*) bfd_name=z8k-coff strip_underscore=yes ;; - - *-*-aout*) bfd_name=${cpu}-aout strip_underscore=yes ;; - *-*-bsd*) bfd_name=${cpu}-aout strip_underscore=yes ;; - *-*-ieee*) bfd_name=ieee ;; - *-*-netware*) bfd_name=${cpu}-nlm ;; - *-*-sysv4*) bfd_name=${cpu}-elf ;; - *-*-solaris2*) bfd_name=${cpu}-elf ;; - *-*-vsta*) bfd_name=${cpu}-aout strip_underscore=yes ;; - *-*-go32*) bfd_name=${cpu}-coff ;; - *-*-sysv*) bfd_name=${cpu}-coff ;; - - *-*-aout64*) bfd_name=${cpu}-aout64 strip_underscore=yes ;; - *-*-elf64*) bfd_name=${cpu}-elf64 ;; - - *-adobe-*) bfd_name=adobe strip_underscore=yes ;; - *-sony-*) bfd_name=news strip_underscore=yes ;; - *-intel-*) bfd_name=${cpu}-coff ;; - *-stratus-*) bfd_name=${cpu}-elf ;; - *-cbm-*) bfd_name=${cpu}-elf ;; - *-ncr-*) bfd_name=${cpu}-elf ;; - *-tandem-*) bfd_name=st2000 ;; - - # Allow targets that config.sub doesn't recognize, like "all". - *) bfd_name=$canon ;; -esac + hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4*) + targ_defvec=bfd_elf32_hppa_vec + ;; + hppa*-*-bsd*) + targ_defvec=som_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; + hppa*-*-hpux* | hppa*-*-hiux*) + targ_defvec=som_vec + ;; + hppa*-*-osf*) + targ_defvec=som_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; + + i[345]86-*-sysv4* | i[345]86-*-unixware | i[345]86-*-solaris2* | \ + i[345]86-*-elf) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386coff_vec + ;; + i[345]86-*-sysv* | i[345]86-*-isc* | i[345]86-*-sco* | i[345]86-*-coff | \ + i[345]86-*-aix* | i[345]86-*-go32*) + targ_defvec=i386coff_vec + ;; + i[345]86-sequent-bsd*) + targ_defvec=i386dynix_vec + targ_underscore=yes + ;; + i[345]86-*-bsd* | i[345]86-*-freebsd*) + targ_defvec=i386bsd_vec + targ_underscore=yes + ;; + i[345]86-*-netbsd*) + targ_defvec=i386netbsd_vec + targ_selvecs=i386bsd_vec + targ_underscore=yes + ;; + i[345]86-*-netware*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="nlm32_i386_vec i386coff_vec i386aout_vec" + ;; + i[345]86-*-linuxaout*) + targ_defvec=i386linux_vec + targ_selvecs=bfd_elf32_i386_vec + targ_underscore=yes + ;; + i[345]86-*-linux*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386linux_vec + targ_underscore=yes + ;; + i[345]86-*-lynxos*) + targ_defvec=i386lynx_coff_vec + targ_selvecs=i386lynx_aout_vec + ;; + i[345]86-*-gnu*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386mach3_vec + targ_cflags=-DSTAT_FOR_EXEC + targ_underscore=yes + ;; + i[345]86-*-mach* | i[345]86-*-osf1mk*) + targ_defvec=i386mach3_vec + targ_cflags=-DSTAT_FOR_EXEC + targ_underscore=yes + ;; + i[345]86-*-os9k) + targ_defvec=i386os9k_vec + ;; + i[345]86-*-msdos*) + targ_defvec=i386aout_vec + targ_selvecs=i386msdos_vec + ;; + i[345]86-*-moss*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386msdos_vec i386aout_vec" + ;; + i[345]86-*-win32 | i[345]86-*-winnt | i[345]86-*-pe) + targ_defvec=i386pe_ve + targ_selvecs="i386pe_vec i386pei_vec" + ;; + i[345]86-none-*) + targ_defvec=i386coff_vec + ;; + i[345]86-*-aout* | i[345]86*-*-vsta*) + targ_defvec=i386_aout_vec + ;; + + i860-*-sysv4*) + targ_defvec=bfd_elf32_i860_vec + ;; + + i960-*-vxworks4* | i960-*-vxworks5.0) + targ_defvec=b_out_vec_little_host + targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec" + targ_underscore=yes + ;; + i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv*) + targ_defvec=icoff_little_vec + targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host" + targ_underscore=yes + ;; + i960-*-vxworks* | i960-*-aout* | i960-*-bout* | i960-*-nindy*) + targ_defvec=b_out_vec_little_host + targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec" + targ_underscore=yes + ;; -if [ "x$2" = "x_" ]; then - echo $strip_underscore -else - echo $bfd_name -fi + m68*-apollo-*) + targ_defvec=apollocoff_vec + ;; + m68*-bull-sysv*) + targ_defvec=m68kcoffun_vec + targ_underscore=yes + ;; + m68*-hp-bsd*) + targ_defvec=hp300bsd_vec + targ_underscore=yes + ;; + m68*-*-aout*) + targ_defvec=aout0_big_vec + # We include this here, rather than making a separate cisco + # configuration, so that cisco-core.c gets routinely tested at + # least for compilation. + targ_selvecs=cisco_core_vec + targ_underscore=yes + ;; + m68*-*-elf* | m68*-*-sysv4* | m68*-cbm-*) + targ_defvec=bfd_elf32_m68k_vec + targ_selvecs=m68kcoff_vec + ;; + m68*-*-coff* | m68*-*-sysv*) + targ_defvec=m68kcoff_vec + targ_selvecs="m68kcoff_vec versados_vec" + ;; + m68*-*-hpux*) + targ_defvec=hp300hpux_vec + targ_underscore=yes + ;; + m68*-*-lynxos*) + targ_defvec=m68klynx_coff_vec + targ_selvecs=m68klynx_aout_vec + ;; + m68*-*-netbsd*) + targ_defvec=m68knetbsd_vec + targ_selvecs="hp300bsd_vec sunos_big_vec" + targ_underscore=yes + ;; + m68*-*-sunos* | m68*-*-os68k* | m68*-*-vxworks* | m68*-netx-* | \ + m68*-*-bsd* | m68*-*-vsta*) + targ_defvec=sunos_big_vec + targ_underscore=yes + ;; + m68*-ericsson-*) + targ_defvec=sunos_big_vec + targ_selvecs="m68kcoff_vec tekhex_vec" + targ_underscore=yes + ;; + + m88*-harris-cxux* | m88*-*-dgux* | m88*-*-sysv4*) + targ_defvec=bfd_elf32_m88k_vec + targ_selvecs=m88kbcs_vec + ;; + m88*-*-mach3*) + targ_defvec=m88kmach3_vec + targ_cflags=-DSTAT_FOR_EXEC + ;; + m88*-*-*) + targ_defvec=m88kbcs_vec + targ_underscore=yes + ;; + + mips*-big-*) + targ_defvec=ecoff_big_vec + targ_selvecs=ecoff_little_vec + ;; + mips*-dec-bsd*) + targ_defvec=aout_mips_little_vec + targ_underscore=yes + ;; + mips*-dec-mach3*) + targ_defvec=aout_mips_little_vec + targ_cflags=-DSTAT_FOR_EXEC + ;; + mips*-dec-* | mips*el-*-ecoff*) + targ_defvec=ecoff_little_vec + targ_selvecs=ecoff_big_vec + ;; + mips*-*-ecoff*) + targ_defvec=ecoff_big_vec + targ_selvecs=ecoff_little_vec + ;; + mips*-*-irix5*) + targ_defvec=bfd_elf32_bigmips_vec + targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec" + ;; + mips*-sgi-* | mips*-*-bsd*) + targ_defvec=ecoff_big_vec + targ_selvecs=ecoff_little_vec + ;; + mips*-*-mach3*) + targ_defvec=aout_mips_little_vec + targ_cflags=-DSTAT_FOR_EXEC + ;; + mips*-*-sysv4*) + targ_defvec=bfd_elf32_bigmips_vec + targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec" + ;; + mips*-*-sysv* | mips*-*-riscos*) + targ_defvec=ecoff_big_vec + targ_selvecs=ecoff_little_vec + ;; + mips*el-*-elf*) + targ_defvec=bfd_elf32_littlemips_vec + targ_selvecs=bfd_elf32_bigmips_vec + ;; + mips*-*-elf*) + targ_defvec=bfd_elf32_bigmips_vec + targ_selvecs=bfd_elf32_littlemips_vec + ;; + + ns32k-pc532-mach*) + targ_defvec=pc532machaout_vec + targ_underscore=yes + ;; + ns32k-*-netbsd*) + targ_defvec=pc532netbsd_vec + targ_underscore=yes + ;; + + powerpc-*-aix*) + targ_defvec=rs6000coff_vec + ;; + powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | powerpc-*-solaris2*) + targ_defvec=bfd_elf32_powerpc_vec + targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec" + ;; + powerpc-*-netware*) + targ_defvec=bfd_elf32_powerpc_vec + targ_selvecs="nlm32_powerpc_vec rs6000coff_vec" + ;; + powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ + powerpcle-*-solaris2*) + targ_defvec=bfd_elf32_powerpcle_vec + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec" + ;; + + rs6000-*-*) + targ_defvec=rs6000coff_vec + ;; + + sparc-*-lynxos*) + targ_defvec=sparclynx_coff_vec + targ_selvecs=sparclynx_aout_vec + ;; + sparc-*-netbsd*) + targ_defvec=sparcnetbsd_vec + targ_underscore=yes + ;; + sparc-*-solaris2* | sparc-*-sysv4*) + targ_defvec=bfd_elf32_sparc_vec + targ_selvecs=sunos_big_vec + ;; + sparc64-*-aout*) + targ_defvec=sunos_big_vec + targ_underscore=yes + ;; + sparc64-*-elf* | sparc64-*-sysv4* | sparc64-*-solaris2*) + targ_defvec=bfd_elf64_sparc_vec + targ_selvecs=bfd_elf32_sparc_vec + ;; + sparc-*-netware*) + targ_defvec=bfd_elf32_sparc_vec + targ_selvecs="nlm32_sparc_vec sunos_big_vec" + ;; + sparc*-*-coff*) + targ_defvec=sparccoff_vec + ;; + sparc*-*-*) + targ_defvec=sunos_big_vec + targ_underscore=yes + ;; + + tahoe-*-*) + targ_defvec=host_aout_vec + targ_underscore=yes + ;; + + 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-*-*) + targ_defvec=host_aout_vec + targ_underscore=yes + ;; + + we32k-*-*) + targ_defvec=we32kcoff_vec + ;; + + w65-*-*) + targ_defvec=w65_vec + ;; + + z8k*-*-*) + targ_defvec=z8kcoff_vec + targ_underscore=yes + ;; + + *-*-ieee*) + targ_defvec=ieee_vec + ;; + + *-adobe-*) + targ_defvec=a_aout_adobe_vec + targ_underscore=yes + ;; + + *-sony-*) + targ_defvec=newsos3_vec + targ_underscore=yes + ;; + + *-tandem-*) + targ_defvec=m68kcoff_vec + targ_selvecs=ieee_vec + ;; + + *) + echo 1>&2 "*** BFD does not support target ${targ}." + echo 1>&2 "*** Look in bfd/config.bfd for supported targets." + exit 1 + ;; +esac diff --git a/bfd/configure b/bfd/configure index 64fc49c..1817e6e 100755 --- a/bfd/configure +++ b/bfd/configure @@ -603,6 +603,11 @@ else host_makefile_frag=/dev/null fi +frags= +if test $host_makefile_frag != /dev/null ; then + frags="$host_makefile_frag" +fi + # If we are configured native, pick a core file support file. COREFILE= @@ -691,35 +696,25 @@ if test -n "$enable_targets" ; then fi all_targets=false - +defvec= +selvecs= +selarchs= +TDEFINES= for targ in $target $canon_targets do - bfd_target=`${config_shell} $srcdir/config.bfd $targ` - - if test "x$bfd_target" = "xall" ; then + if test "x$targ" = "xall"; then all_targets=true else - if test ! -f ${srcdir}/config/${bfd_target}.mt ; then - { echo "configure: error: *** No file ${srcdir}/config/${bfd_target}.mt. -*** BFD does not support target ${bfd_target}. -*** Look in bfd/config.bfd for supported targets." 1>&2; exit 1; } - exit 1 - fi - - if test "x$targ" = "x$target" ; then - target_makefile_frag=${srcdir}/config/${bfd_target}.mt - else - target_extra_frags="$target_extra_frags ${srcdir}/config/${bfd_target}.mt" + . $srcdir/config.bfd + if test "x$targ" = "x$target"; then + defvec=$targ_defvec fi + selvecs="$selvecs $targ_defvec $targ_selvecs" + selarchs="$selarchs $targ_archs" + TDEFINES="$TDEFINES $targ_cflags" fi done -frags=$target_makefile_frag -if test $host_makefile_frag != /dev/null ; then - frags="$frags $host_makefile_frag" -fi - - # This processing still needs to be done if we're to decide properly whether # 64-bit support needs to be compiled in. Currently, it will be included if @@ -728,48 +723,32 @@ fi # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is # used. -# The default vector in the primary target. -DEFAULT_VECTOR=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -' $target_makefile_frag` - -allfrags="$target_makefile_frag $target_extra_frags" - -# The default and selected vectors in all the configured targets. -SELECT_VECS=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -s/SELECT_VECS[ ]*=[ ]*\([^ ]*\)/\1/p -' $allfrags` -# uniq the list. +# uniq the default and selected vectors in all the configured targets. f="" -for i in $SELECT_VECS ; do +for i in $selvecs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_VECS="$f" +selvecs="$f" -# The architectures in all the configured targets. -SELECT_ARCHITECTURES=`sed -n ' -s/SELECT_ARCHITECTURES[ ]*=[ ]*//p -' $allfrags` -# uniq the list. +# uniq the architectures in all the configured targets. f="" -for i in $SELECT_ARCHITECTURES ; do +for i in $selarchs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_ARCHITECTURES="$f" +selarchs="$f" # Target backend .o files. tb= elf="elf.o elflink.o" -for vec in $SELECT_VECS +for vec in $selvecs do case "$vec" in # This list is alphabetized to make it easy to compare @@ -879,7 +858,7 @@ do done # Target architecture .o files. -ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` +ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` # Weed out duplicate .o files. f="" @@ -906,12 +885,14 @@ bfd_machines="$ta" if test x${all_targets} = xtrue ; then bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' + selvecs= + selarchs= else # all_targets is true # Only set these if they will be nonempty, for the clever echo. - test -n "$SELECT_VECS" && - selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` - test -n "SELECT_ARCHITECTURES" && - selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'` + test -n "$selvecs" && + selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` + test -n "$selarchs" && + selarchs=`echo $selarchs | sed -e 's/ \(.\)/,\1/g'` fi # all_targets is true case ${host64}-${target64}-${want64} in @@ -930,8 +911,6 @@ esac -test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR" - tdefaults="" test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" @@ -1071,11 +1050,10 @@ s%@build_os@%$build_os%g s%@RANLIB@%$RANLIB%g /@host_makefile_frag@/r $host_makefile_frag s%@host_makefile_frag@%%g +s%@frags@%$frags%g s%@COREFILE@%$COREFILE%g s%@COREFLAG@%$COREFLAG%g -/@target_makefile_frag@/r $target_makefile_frag -s%@target_makefile_frag@%%g -s%@frags@%$frags%g +s%@TDEFINES@%$TDEFINES%g s%@wordsize@%$wordsize%g s%@all_backends@%$all_backends%g s%@bfd_backends@%$bfd_backends%g diff --git a/bfd/configure.in b/bfd/configure.in index 83acbea..42af6b9 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -49,6 +49,11 @@ else host_makefile_frag=/dev/null fi AC_SUBST_FILE(host_makefile_frag) +frags= +if test $host_makefile_frag != /dev/null ; then + frags="$host_makefile_frag" +fi +AC_SUBST(frags) # If we are configured native, pick a core file support file. COREFILE= @@ -139,35 +144,25 @@ if test -n "$enable_targets" ; then fi all_targets=false - +defvec= +selvecs= +selarchs= +TDEFINES= for targ in $target $canon_targets do - bfd_target=`${config_shell} $srcdir/config.bfd $targ` - - if test "x$bfd_target" = "xall" ; then + if test "x$targ" = "xall"; then all_targets=true else - if test ! -f ${srcdir}/config/${bfd_target}.mt ; then - AC_MSG_ERROR(*** No file ${srcdir}/config/${bfd_target}.mt. -*** BFD does not support target ${bfd_target}. -*** Look in bfd/config.bfd for supported targets.) - exit 1 - fi - - if test "x$targ" = "x$target" ; then - target_makefile_frag=${srcdir}/config/${bfd_target}.mt - else - target_extra_frags="$target_extra_frags ${srcdir}/config/${bfd_target}.mt" + . $srcdir/config.bfd + if test "x$targ" = "x$target"; then + defvec=$targ_defvec fi + selvecs="$selvecs $targ_defvec $targ_selvecs" + selarchs="$selarchs $targ_archs" + TDEFINES="$TDEFINES $targ_cflags" fi done - -frags=$target_makefile_frag -if test $host_makefile_frag != /dev/null ; then - frags="$frags $host_makefile_frag" -fi -AC_SUBST_FILE(target_makefile_frag) -AC_SUBST(frags) +AC_SUBST(TDEFINES) # This processing still needs to be done if we're to decide properly whether # 64-bit support needs to be compiled in. Currently, it will be included if @@ -176,50 +171,32 @@ AC_SUBST(frags) # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is # used. -changequote(,)dnl -# The default vector in the primary target. -DEFAULT_VECTOR=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -' $target_makefile_frag` - -allfrags="$target_makefile_frag $target_extra_frags" - -# The default and selected vectors in all the configured targets. -SELECT_VECS=`sed -n ' -s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p -s/SELECT_VECS[ ]*=[ ]*\([^ ]*\)/\1/p -' $allfrags` -# uniq the list. +# uniq the default and selected vectors in all the configured targets. f="" -for i in $SELECT_VECS ; do +for i in $selvecs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_VECS="$f" +selvecs="$f" -# The architectures in all the configured targets. -SELECT_ARCHITECTURES=`sed -n ' -s/SELECT_ARCHITECTURES[ ]*=[ ]*//p -' $allfrags` -# uniq the list. +# uniq the architectures in all the configured targets. f="" -for i in $SELECT_ARCHITECTURES ; do +for i in $selarchs ; do case " $f " in *" $i "*) ;; *) f="$f $i" ;; esac done -SELECT_ARCHITECTURES="$f" -changequote([,])dnl +selarchs="$f" # Target backend .o files. tb= elf="elf.o elflink.o" -for vec in $SELECT_VECS +for vec in $selvecs do case "$vec" in # This list is alphabetized to make it easy to compare @@ -329,7 +306,7 @@ do done # Target architecture .o files. -ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` +ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` # Weed out duplicate .o files. f="" @@ -356,12 +333,14 @@ bfd_machines="$ta" if test x${all_targets} = xtrue ; then bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' + selvecs= + selarchs= else # all_targets is true # Only set these if they will be nonempty, for the clever echo. - test -n "$SELECT_VECS" && - selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` - test -n "SELECT_ARCHITECTURES" && - selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'` + test -n "$selvecs" && + selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` + test -n "$selarchs" && + selarchs=`echo $selarchs | sed -e 's/ \(.\)/,\1/g'` fi # all_targets is true case ${host64}-${target64}-${want64} in @@ -380,8 +359,6 @@ AC_SUBST(all_backends) AC_SUBST(bfd_backends) AC_SUBST(bfd_machines) -test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR" - tdefaults="" test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" |