]>
Commit | Line | Data |
---|---|---|
a92c5906 SS |
1 | # Configuration fragment for BFD. |
2 | ||
e0151f38 SS |
3 | # This is almost always correct. |
4 | ||
698e0075 | 5 | Set selarchs "&bfd_{target_cpu}_arch" |
e0151f38 SS |
6 | Set defvec "" |
7 | Set selvecs "" | |
dee99794 | 8 | Set havevecs "" |
1d3c6d87 SS |
9 | |
10 | If "{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 | 16 | Else 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 | 23 | Else 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 | |
29 | Else 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 | 35 | Else 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 | 40 | End If |
1d3c6d87 | 41 | |
698e0075 | 42 | Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'` |
e0151f38 | 43 | |
dee99794 | 44 | Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs} {havevecs}" |
e0151f38 | 45 | |
698e0075 SS |
46 | Echo '# From mpw-config.in' > "{o}"mk.tmp |
47 | Echo 'WORDSIZE = 32' >> "{o}"mk.tmp | |
48 | Echo 'BFD_MACHINES = ' {ta} >> "{o}"mk.tmp | |
49 | Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp | |
50 | Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp | |
51 | Echo 'HDEPFILES = ' >> "{o}"mk.tmp | |
52 | Echo 'TDEPFILES = ' >> "{o}"mk.tmp | |
53 | Echo '# End from mpw-config.in' >> "{o}"mk.tmp | |
54 | ||
55 | Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new | |
56 | Echo '#include "mpw.h"' >> "{o}"config.new | |
57 | ||
58 | MoveIfChange "{o}"config.new "{o}"config.h | |
e0151f38 | 59 | |
698e0075 SS |
60 | # We can only handle 32-bit targets right now. |
61 | ||
62 | sed -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 | 71 | MoveIfChange "{o}"bfd.h-new "{o}"bfd.h |
e0151f38 | 72 | |
b576c7b3 SS |
73 | sed -e 's/NN/32/g' "{srcdir}"elfxx-target.h >"{o}"elf32-target.h-new |
74 | MoveIfChange "{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 |
78 | sed -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 | 86 | MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h |