* configure.in: Make sure that CC is undefined (as opposed to
[deliverable/binutils-gdb.git] / gas / README.rich
CommitLineData
0e39a8bb
RP
1
2
3 The Code Pedigree of This Directory
4
5
6This directory contains a big merge of several development lines of
7gas as well as a few bug fixes and some configuration that I've added
8in order to retain my own sanity.
9
10A little history.
11
12The only common baseline of all versions was gas-1.31.
13
14From 1.31, Intel branched off and added:
15
16 support for the Intel 80960 (i960) processor.
17 support for b.out object files.
18 some bug fixes.
19 sloppy mac MPW support
20 Intel gnu/960 makefiles and version numbering.
21
22Many of the bug fixes found their way into the main development line
23prior to 1.36. ALL intel changes were ifdef'd I80960. This was good
24as it isolated the changes, but bad in that it connected the b.out
25support to the i960 support, and bad in that the bug fixes were only
26active in the i960+b.out executables of gas, (although most of these
27were nicely marked with comments indicating that they were probably
28general bug fixes.)
29
30To pick up the main FSF development line again, along the way to 1.36,
31several new processors were added, many bugs fixed, and the world was
32a somewhat better place in general.
33
34From gas-1.36, Loic at Axis Design (france!) encapsulated object
35format specific actions, added coff versions of those encapsulations,
36and a config.gas style configuration and Makefile. This was a big
37change and a lot of work.
38
39Then along came the FIRST FSF release of gas-1.37. I say this because
40there have been at least two releases of gas-1.37. Only two of them
41do we care about for this story, so let's call them gas-1.37.1 and
42gas-1.37.2.
43
44Here starts the confusion. Firstly, gas-1.37.1 did not compile.
45
46In the meantime, John Gilmore at Cygnus Support had been hacking
47gas-1.37.1. He got it to compile. He added support for the AMD 29000
48processor. AND he started encapsulating some of the a.out specific
49pieces of code mostly into functions. AND he rebuilt the relocation
50info to be generic. AND he restructured somewhat so that for a single
51host, cross assemblers could be built for all targets in the same
52directory. Useful work but a considerable nuisance because the a29k
53changes were not partitioned from the encapsulation changes, the
54encapsulation changes were incomplete, and the encapsulation required
55functions where alternate structuring might have used macros. Let's
56call this version gas-1.37.1+a29k.
57
58By the time gas-1.37.2 was "released", (remember that it TOO was
59labelled by FSF as gas-1.37), it compiled, but it also added i860
60support and ansi style const declarations.
61
62At this point, Loic rolled his changes into gas-1.37.2.
63
64What I've done.
65
66I collected all the stray versions of gas that sounded relevant to my
67goals of cross assembly and alternate object file formats and the FSF
68releases from which the stray versions had branched.
69
70I rolled the Intel i960 changes from 1.31 into versions that I call
711.34+i960, 1.36+i960, and then 1.37.1+i960.
72
73Then I merged 1.37.1+i960 with 1.37.1+a29k to produce what I call
741.37.1+i960+a29k or 1.37.3.
75
76From 1.37.3, I pulled in Loic's stuff. This wasn't easy as Loic's
77stuff hit all the same points as John's encapsulations. Loic's goal
78was to split the a.out from coff dependancies for native assembly on
79coff, while John's was to split for multiple cross assembly from a
80single host.
81
82Loic's config arranged files much like emacs into m-*, etc. I've
83rearranged these somewhat.
84
85Theory:
86
87The goal of the new configuration scheme is to bury all object format,
88target processor, and host machine dependancies in object, target, and
89host specific files. That is, to move all #ifdef's out of the gas
90common code.
91
92Here's how it works. There is a .h and a .c file for each object file
93format, a .h and a .c file for each target processor, and a .h for
94each host. config.gas creates {sym}links in the current directory to
95the appropriate files in the config directory. config.gas also serves
96as a list of triplets {host, target, object-format} that have been
97tested at one time or another. I also recommend that config.gas be
98used to document triplet specific notes as to purpose of the triplet,
99etc.
100
101Implementation:
102
103host.h is a {sym}link to .../config/xm-yourhost.h. It is intended to
104be used to hide host compiler, system header file, and system library
105differences between host machines. If your host needs actual c source
106files, then either: these are generally useful functions, in which
107case you should probably build a local library outside of the gas
108source tree, or someone, perhaps me, is confused about what is needed
109by different hosts.
110
111obj-format.h is a {sym}link to .../config/obj-something.h. It is intended
112
113All gas .c files include as.h.
114
115as.h #define's "gas", includes host.h, defines a number of gas
116specific structures and types, and then includes tp.h, obj.h, and
117target-environment.h.
118
119target-environment.h defines a target environment specific
120preprocessor flag, eg, TE_SUN, and then includes obj-format.h.
121
122obj-format.h defines an object format specific preprocessor flag, eg,
123OBJ_AOUT, OBJ_BOUT, OBJ_COFF, includes "target-processor.h", and then
124defines the object specific macros, functions, types, and structures.
125
126target-processor.h
127
128target-processor.
129
130Porting:
131
132There appear to be four major types of ports; new hosts, new target
133processors, new object file formats, and new target environments.
134
135
136-----
137
138reloc now stored internally as generic. (symbols too?) (segment types
139vs. names?)
140
141I don't mean to overlook anyone here. There have also been several
142other development lines here that I looked at and elected to bypass.
143Specifically, xxx's stabs in coff stuff was particularly tempting.
This page took 0.15626 seconds and 4 git commands to generate.