aboutsummaryrefslogtreecommitdiff
path: root/bfd/mpw-config.in
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1995-09-29 02:14:51 +0000
committerStan Shebs <shebs@codesourcery.com>1995-09-29 02:14:51 +0000
commit698e0075ef292e847b24274688ec947af32b64be (patch)
tree9d40576c2cf842a6f3ff80ee8f8f3e23ac82d4d0 /bfd/mpw-config.in
parent0e4ca328e1d046bc478f61273b1cb3a86d5c592e (diff)
downloadgdb-698e0075ef292e847b24274688ec947af32b64be.zip
gdb-698e0075ef292e847b24274688ec947af32b64be.tar.gz
gdb-698e0075ef292e847b24274688ec947af32b64be.tar.bz2
* config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
* configure, configure.in: Add pmac_xcoff_vec case. * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o. * coff-pmac.c: New file, PowerMac XCOFF support. * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case. * targets.c (pmac_xcoff_vec): Declare. * mpw-config.in: Various changes to be compatible with the autoconf-based configury. * mpw-make.sed: New file, sed commands to translate Unix makefile into MPW syntax. * mpw-make.in: Remove. * hosts/mpw.h: Remove. * bfd-in.h, bfd-in2.h: If MPW, include the file that defines true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
Diffstat (limited to 'bfd/mpw-config.in')
-rw-r--r--bfd/mpw-config.in59
1 files changed, 35 insertions, 24 deletions
diff --git a/bfd/mpw-config.in b/bfd/mpw-config.in
index 89deaa7..e2bba62 100644
--- a/bfd/mpw-config.in
+++ b/bfd/mpw-config.in
@@ -1,20 +1,8 @@
# Configuration fragment for BFD.
-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
-
-# 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 selarchs "&bfd_{target_cpu}_arch"
Set defvec ""
Set selvecs ""
@@ -23,10 +11,10 @@ If "{target_canonical}" =~ /m68k-apple-macos/
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
+ Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"cofflink.c.o'
+ Set defvec pmac_xcoff_vec
+ Set selvecs '&pmac_xcoff_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
@@ -41,18 +29,41 @@ Else If "{target_canonical}" =~ /sh-hitachi-hms/
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 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 '# 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 'HDEPFILES = ' >> "{o}"mk.tmp
+Echo 'TDEPFILES = ' >> "{o}"mk.tmp
+Echo '# End from mpw-config.in' >> "{o}"mk.tmp
+
+Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
+Echo '#include "mpw.h"' >> "{o}"config.new
+
+MoveIfChange "{o}"config.new "{o}"config.h
-Echo 'WORDSIZE = 32' >> "{o}"mk.tmp
+# We can only handle 32-bit targets right now.
+
+sed -e 's/@WORDSIZE@/32/' \Option-d
+ -e "s/@VERSION@/`Catenate {srcdir}VERSION`/" \Option-d
+ -e 's/@BFD_HOST_64BIT_LONG@/0/' \Option-d
+ "{srcdir}"bfd-in2.h >"{o}"bfd.h-new
-Echo 'BFD_MACHINES = ' {ta} >>"{o}"mk.tmp
+MoveIfChange "{o}"bfd.h-new "{o}"bfd.h
-Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp
+# Pre-expand some macros in coffswap.h, so MPW C doesn't choke.
-Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp
+sed -e 's/^ PUT_AOUTHDR_TSIZE (/ bfd_h_put_32 (/' \Option-d
+ -e 's/^ PUT_AOUTHDR_DSIZE (/ bfd_h_put_32 (/' \Option-d
+ -e 's/^ PUT_AOUTHDR_BSIZE (/ bfd_h_put_32 (/' \Option-d
+ -e 's/^ PUT_AOUTHDR_ENTRY (/ bfd_h_put_32 (/' \Option-d
+ -e 's/^ PUT_AOUTHDR_TEXT_START (/ bfd_h_put_32 (/' \Option-d
+ -e 's/^ PUT_AOUTHDR_DATA_START (/ bfd_h_put_32 (/' \Option-d
+ "{srcdir}"coffswap.h >"{o}"coffswap.h-new
-Echo '# End from mpw-config.in' >> "{o}"mk.tmp
+MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h