* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[deliverable/binutils-gdb.git] / gas / mpw-config.in
CommitLineData
ea838f99
SS
1# Configuration fragment for GAS.
2
9e4eebc2
SS
3Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
4
6144e9a9
SS
5If "{target_arch}" =~ /powerpc/
6 Set short_arch_name "ppc"
7 Set target_cpu "powerpc"
8Else
9 Set short_arch_name "{target_arch}"
10End If
11
f64fd87f 12# The following works for many configurations, though not all.
9e4eebc2 13
a23e2b7c 14Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
c611cd82 15Set target_os `echo {target_canonical} | sed -e 's/.*-.*-//'`
a23e2b7c 16
d21041b3
SS
17Set bfd_gas no
18
f64fd87f 19Set TDEFINES ""
a23e2b7c 20
6144e9a9
SS
21Set EXTRA_OBJECTS ""
22
90f543f6
SS
23# Default emulation.
24
25Set em generic
26
a23e2b7c
SS
27If "{target_canonical}" =~ /m68k-apple-macos/
28 Set obj_format "coff"
d21041b3 29 Set TDEFINES '-d M68KCOFF'
6144e9a9 30 Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
90f543f6 31
6144e9a9
SS
32Else If "{target_canonical}" =~ /powerpc-apple-macos/
33 Set obj_format "coff"
d21041b3 34 Set bfd_gas yes
90f543f6
SS
35 Set em macos
36
9072e640 37Else If "{target_canonical}" =~ /i386-\Option-x-go32/
a23e2b7c 38 Set obj_format "coff"
d21041b3 39 Set TDEFINES '-d I386COFF'
90f543f6 40
9072e640 41Else If "{target_canonical}" =~ /m68k-\Option-x-coff/
d21041b3 42 Set TDEFINES '-d M68KCOFF'
90f543f6 43
a23e2b7c 44Else If "{target_canonical}" =~ /mips-idt-ecoff/
d21041b3 45 Set bfd_gas yes
af16e411 46 Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
90f543f6 47
9072e640
SS
48Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
49 # Assume other OSes etc use ELF
50 Set obj_format "elf"
90f543f6 51 Set bfd_gas yes
af16e411 52 Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
9072e640 53 forward-include "{srcroot}"bfd:elf-bfd.h 'bfd/elf-bfd.h'
90f543f6 54
9072e640 55Else If "{target_canonical}" =~ /sh-\Option-x-hms/
d21041b3
SS
56 Set obj_format "coff"
57 forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
a23e2b7c 58End If
9e4eebc2 59
6144e9a9
SS
60forward-include "{srcdir}"config:tc-{short_arch_name}.c targ-cpu.c
61forward-include "{srcdir}"config:tc-{short_arch_name}.h targ-cpu.h
9e4eebc2 62
a23e2b7c
SS
63forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
64forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
9e4eebc2 65
90f543f6 66forward-include "{srcdir}"config:te-{em}.h targ-env.h
9e4eebc2 67
a23e2b7c
SS
68# Special cases for float handling.
69
9e4eebc2
SS
70If "{target_arch}" =~ /ns32k/
71 forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
72Else If "{target_arch}" =~ /tahoe/
73 forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
74Else If "{target_arch}" =~ /vax/
75 forward-include "{srcdir}"config:atof-vax.c atof-targ.c
76Else
77 # Use IEEE by default.
78 forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
79End If
a23e2b7c 80
6144e9a9
SS
81Echo '# From mpw-config.in' > "{o}"mk.tmp
82Echo "TDEFINES = " {TDEFINES} >> "{o}"mk.tmp
83Echo "EXTRA_OBJECTS = " {EXTRA_OBJECTS} >> "{o}"mk.tmp
84# (We use the -n option here so as not to get extra spaces inserted)
85Echo -n 'TARG_CPU_DEP = {TARG_CPU_DEP_' >> "{o}"mk.tmp
86Echo -n {short_arch_name} >> "{o}"mk.tmp
87Echo -n '}' >> "{o}"mk.tmp
88Echo '# End from mpw-config.in' >> "{o}"mk.tmp
89
90Echo '/* conf. Generated by mpw-configure. */' > "{o}"conf.new
91Echo -n '#define TARGET_CPU "' >> "{o}"conf.new
92Echo -n "{target_cpu}" >> "{o}"conf.new
93Echo '"' >> "{o}"conf.new
c611cd82
SS
94Echo -n '#define TARGET_OS "' >> "{o}"conf.new
95Echo -n "{target_os}" >> "{o}"conf.new
96Echo '"' >> "{o}"conf.new
6144e9a9
SS
97Echo -n '#define TARGET_ALIAS "' >> "{o}"conf.new
98Echo -n "{target_alias}" >> "{o}"conf.new
99Echo '"' >> "{o}"conf.new
100Echo -n '#define TARGET_CANONICAL "' >> "{o}"conf.new
101Echo -n "{target_canonical}" >> "{o}"conf.new
102Echo '"' >> "{o}"conf.new
103Echo '#include "mpw.h"' >> "{o}"conf.new
d21041b3 104If "{bfd_gas}" =~ /yes/
6144e9a9 105 Echo "#define BFD_ASSEMBLER" >> "{o}"conf.new
d21041b3 106Else
6144e9a9 107 Echo "#define MANY_SEGMENTS" >> "{o}"conf.new
d21041b3 108End If
6144e9a9
SS
109Echo '#define CR_EOL' >> "{o}"conf.new
110Echo '#define OBJ_COFF_OMIT_TIMESTAMP' >> "{o}"conf.new
111Echo '#define LOSING_COMPILER' >> "{o}"conf.new
d21041b3 112
6144e9a9 113MoveIfChange "{o}"conf.new "{o}"conf
a23e2b7c 114
6144e9a9 115sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit
This page took 0.183026 seconds and 4 git commands to generate.