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