]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/mpw-config.in
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / bfd / mpw-config.in
CommitLineData
a92c5906
SS
1# Configuration fragment for BFD.
2
e0151f38
SS
3# This is almost always correct.
4
698e0075 5Set selarchs "&bfd_{target_cpu}_arch"
e0151f38
SS
6Set defvec ""
7Set selvecs ""
dee99794 8Set havevecs ""
1d3c6d87
SS
9
10If "{target_canonical}" =~ /m68k-apple-macos/
e0151f38
SS
11 Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o'
12 Set defvec m68kcoff_vec
13 Set selvecs '&m68kcoff_vec'
dee99794 14 Set havevecs '-d HAVE_m68kcoff_vec'
480ccad5 15
e0151f38 16Else If "{target_canonical}" =~ /powerpc-apple-macos/
aadf04f7 17 Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o'
698e0075
SS
18 Set defvec pmac_xcoff_vec
19 Set selvecs '&pmac_xcoff_vec'
dee99794 20 Set havevecs '-d HAVE_pmac_xcoff_vec'
698e0075 21 Set selarchs "&bfd_powerpc_arch"
480ccad5 22
b576c7b3 23Else If "{target_canonical}" =~ /i386-\Option-x-go32/
e0151f38
SS
24 Set BFD_BACKENDS '"{o}"coff-i386.c.o'
25 Set defvec i386coff_vec
26 Set selvecs '&i386coff_vec'
dee99794 27 Set havevecs '-d HAVE_i386coff_vec'
480ccad5
SS
28
29Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
b576c7b3 30 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'
e0151f38 31 Set defvec ecoff_big_vec
b576c7b3 32 Set selvecs '&ecoff_big_vec,&ecoff_little_vec,&bfd_elf32_bigmips_vec'
dee99794 33 Set havevecs '-d HAVE_ecoff_big_vec -d HAVE_ecoff_little_vec -d HAVE_bfd_elf32_bigmips_vec'
480ccad5 34
b576c7b3 35Else If "{target_canonical}" =~ /sh-\Option-x-hms/
e0151f38
SS
36 Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o'
37 Set defvec shcoff_vec
38 Set selvecs '&shcoff_vec,&shlcoff_vec'
dee99794 39 Set havevecs '-d HAVE_shcoff_vec -d HAVE_shlcoff_vec'
c71f5783 40End If
1d3c6d87 41
698e0075 42Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'`
e0151f38 43
dee99794 44Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs} {havevecs}"
e0151f38 45
698e0075
SS
46Echo '# From mpw-config.in' > "{o}"mk.tmp
47Echo 'WORDSIZE = 32' >> "{o}"mk.tmp
48Echo 'BFD_MACHINES = ' {ta} >> "{o}"mk.tmp
49Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp
50Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp
51Echo 'HDEPFILES = ' >> "{o}"mk.tmp
52Echo 'TDEPFILES = ' >> "{o}"mk.tmp
53Echo '# End from mpw-config.in' >> "{o}"mk.tmp
54
55Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
56Echo '#include "mpw.h"' >> "{o}"config.new
57
58MoveIfChange "{o}"config.new "{o}"config.h
e0151f38 59
698e0075
SS
60# We can only handle 32-bit targets right now.
61
62sed -e 's/@WORDSIZE@/32/' \Option-d
22edd547 63 -e 's/@wordsize@/32/' \Option-d
698e0075 64 -e "s/@VERSION@/`Catenate {srcdir}VERSION`/" \Option-d
22edd547
SS
65 -e 's/@BFD_HOST_64_BIT_DEFINED@/0/' \Option-d
66 -e 's/@BFD_HOST_64_BIT@//' \Option-d
67 -e 's/@BFD_HOST_U_64_BIT@//' \Option-d
698e0075
SS
68 -e 's/@BFD_HOST_64BIT_LONG@/0/' \Option-d
69 "{srcdir}"bfd-in2.h >"{o}"bfd.h-new
e0151f38 70
698e0075 71MoveIfChange "{o}"bfd.h-new "{o}"bfd.h
e0151f38 72
b576c7b3
SS
73sed -e 's/NN/32/g' "{srcdir}"elfxx-target.h >"{o}"elf32-target.h-new
74MoveIfChange "{o}"elf32-target.h-new "{o}"elf32-target.h
75
698e0075 76# Pre-expand some macros in coffswap.h, so MPW C doesn't choke.
e0151f38 77
698e0075
SS
78sed -e 's/^ PUT_AOUTHDR_TSIZE (/ bfd_h_put_32 (/' \Option-d
79 -e 's/^ PUT_AOUTHDR_DSIZE (/ bfd_h_put_32 (/' \Option-d
80 -e 's/^ PUT_AOUTHDR_BSIZE (/ bfd_h_put_32 (/' \Option-d
81 -e 's/^ PUT_AOUTHDR_ENTRY (/ bfd_h_put_32 (/' \Option-d
82 -e 's/^ PUT_AOUTHDR_TEXT_START (/ bfd_h_put_32 (/' \Option-d
83 -e 's/^ PUT_AOUTHDR_DATA_START (/ bfd_h_put_32 (/' \Option-d
84 "{srcdir}"coffswap.h >"{o}"coffswap.h-new
e0151f38 85
698e0075 86MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h