diff options
author | Stan Shebs <shebs@codesourcery.com> | 1995-06-15 21:18:17 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1995-06-15 21:18:17 +0000 |
commit | e0151f38e1579b8f043603060c2ff0f84846652c (patch) | |
tree | 947cf43829d078065577a813e8ebd92b41fff7a3 /bfd/mpw-config.in | |
parent | f6d6f1028e548ad691467c88d852b3ed94887881 (diff) | |
download | gdb-e0151f38e1579b8f043603060c2ff0f84846652c.zip gdb-e0151f38e1579b8f043603060c2ff0f84846652c.tar.gz gdb-e0151f38e1579b8f043603060c2ff0f84846652c.tar.bz2 |
* bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
* coffswap.h (coff_swap_scnhdr_out): Remove version that was
hacked for MPW C.
* mpw-config.in: Set shell vars instead of pasting to makefile
for each configuration, edit coffswap.h to make MPW C not choke.
(i386-unknown-coff, sh-hitachi-hms): Recognize.
* mpw-make.in (BFD_LIBS): Add versados.c.o.
* versados.c (versados_scan): Properly cast results from bfd_alloc.
Diffstat (limited to 'bfd/mpw-config.in')
-rw-r--r-- | bfd/mpw-config.in | 59 |
1 files changed, 45 insertions, 14 deletions
diff --git a/bfd/mpw-config.in b/bfd/mpw-config.in index b04a017..89deaa7 100644 --- a/bfd/mpw-config.in +++ b/bfd/mpw-config.in @@ -2,26 +2,57 @@ forward-include "{srcdir}"hosts:mpw.h sysdep.h +# We can only handle 32-bit targets right now. + sed -e 's/@WORDSIZE@/32/' -e "s/@VERSION@/`Catenate {srcdir}VERSION`/" {srcdir}bfd-in2.h >bfd.h-new MoveIfChange bfd.h-new bfd.h -Echo '# From mpw-config.in' > "{o}"mk.tmp +# Pre-expand some macros in coffswap.h, so MPW C doesn't choke. + +sed -e 's/^ PUT_AOUTHDR_TSIZE (/ bfd_h_put_32 (/' -e 's/^ PUT_AOUTHDR_DSIZE (/ bfd_h_put_32 (/' -e 's/^ PUT_AOUTHDR_BSIZE (/ bfd_h_put_32 (/' -e 's/^ PUT_AOUTHDR_ENTRY (/ bfd_h_put_32 (/' -e 's/^ PUT_AOUTHDR_TEXT_START (/ bfd_h_put_32 (/' -e 's/^ PUT_AOUTHDR_DATA_START (/ bfd_h_put_32 (/' {srcdir}coffswap.h >coffswap.h-new +MoveIfChange coffswap.h-new coffswap.h + +# This is almost always correct. + +Set selarchs bfd_{target_cpu}_arch +Set defvec "" +Set selvecs "" If "{target_canonical}" =~ /m68k-apple-macos/ - Echo 'WORDSIZE = 32' >> "{o}"mk.tmp - Echo 'BFD_BACKENDS = "{o}"coff-m68k.c.o "{o}"cofflink.c.o' >>"{o}"mk.tmp - Echo 'BFD_MACHINES = "{o}"cpu-m68k.c.o' >>"{o}"mk.tmp - Echo 'TDEFAULTS = -d DEFAULT_VECTOR=m68kcoff_vec -d SELECT_VECS=&m68kcoff_vec -d SELECT_ARCHITECTURES=bfd_m68k_arch' >> "{o}"mk.tmp -Else If "{target_canonical}" =~ /ppc-apple-macos/ - Echo 'WORDSIZE = 32' >> "{o}"mk.tmp - Echo 'BFD_BACKENDS = "{o}"elf32-ppc.c.o "{o}"elf32.c.o' >> "{o}"mk.tmp - Echo 'BFD_MACHINES = "{o}"cpu-powerpc.c.o' >>"{o}"mk.tmp - Echo 'TDEFAULTS = -d DEFAULT_VECTOR=bfd_elf32_powerpc_vec -d SELECT_VECS= -d SELECT_ARCHITECTURES=bfd_ppc_arch' >> "{o}"mk.tmp + Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o' + Set defvec m68kcoff_vec + Set selvecs '&m68kcoff_vec' +Else If "{target_canonical}" =~ /powerpc-apple-macos/ + Set BFD_BACKENDS '"{o}"coff-rs6000.c.o' + Set defvec rs6000coff_vec + Set selvecs '&rs6000coff_vec' + Set selarchs bfd_powerpc_arch +Else If "{target_canonical}" =~ /i386-unknown-go32/ + Set BFD_BACKENDS '"{o}"coff-i386.c.o' + Set defvec i386coff_vec + Set selvecs '&i386coff_vec' Else If "{target_canonical}" =~ /mips-idt-ecoff/ - Echo 'WORDSIZE = 32' >> "{o}"mk.tmp - Echo 'BFD_BACKENDS = "{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o' >> "{o}"mk.tmp - Echo 'BFD_MACHINES = "{o}"cpu-mips.c.o' >> "{o}"mk.tmp - Echo 'TDEFAULTS = -d DEFAULT_VECTOR=ecoff_big_vec -d SELECT_VECS=&ecoff_big_vec,&ecoff_little_vec -d SELECT_ARCHITECTURES=bfd_mips_arch' >> "{o}"mk.tmp + Set BFD_BACKENDS '"{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o' + Set defvec ecoff_big_vec + Set selvecs '&ecoff_big_vec,&ecoff_little_vec' +Else If "{target_canonical}" =~ /sh-hitachi-hms/ + Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o' + Set defvec shcoff_vec + Set selvecs '&shcoff_vec,&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}" + +Echo '# From mpw-config.in' > "{o}"mk.tmp + +Echo 'WORDSIZE = 32' >> "{o}"mk.tmp + +Echo 'BFD_MACHINES = ' {ta} >>"{o}"mk.tmp + +Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp + +Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp + Echo '# End from mpw-config.in' >> "{o}"mk.tmp |