Mercurial > hg > index.cgi
annotate extra/README @ 389:2d9b7ae6c329
Throw error if address overflows in extended mode
This may or may not cause extra problems due to sloppiness in dealing with
calculations that overflow in 16 bits. However, presumably it is a good idea
so unless something major pops up, it seems like a good idea.
Thanks to Erik G <erik@6809.org> for the patch.
author | William Astle <lost@l-w.ca> |
---|---|
date | Mon, 13 Jul 2015 21:37:49 -0600 |
parents | b0fb675d1ed4 |
children | d0c0fede5021 |
rev | line source |
---|---|
72
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
1 These files are extra utility type scripts that can be used for various |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
2 purposes. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
3 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
4 as |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
5 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
6 This is a sort of front-end script that makes lwasm look approximately like |
182 | 7 gnu as which is useful for using lwasm as a backend to gcc. You may need to |
8 edit it to make it work fully. | |
72
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
9 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
10 ld |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
11 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
12 Similar to the "as" script above except for lwlink. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
13 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
14 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
15 ar |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
16 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
17 Similar to the "as" script above except for lwar. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
18 |
182 | 19 gcc6809lw-4.6.1-1.patch |
340
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
20 gcc6809lw-4.6.4-1.patch |
182 | 21 |
22 These are patches to the main gcc source distribution for specific releases. | |
340
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
23 The last number after the dash is a patch level for the specific patch. It |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
24 is worth noting that a patch for a particular minor version of GCC may work |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
25 with later minor versions in the same release sequence. That is, a patch |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
26 for 4.6.1 might work with 4.6.4. These are different to the official |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
27 gcc6809 releases in the following ways. First, all the source for as-6809 |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
28 is removed. Also, the special "helper" makefile and directory is removed. |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
29 Also, as of this writing, the latest "official" release was for gcc 4.3.4 |
b0fb675d1ed4
Add gcc 4.6.4 version of gcc6809
William Astle <lost@l-w.ca>
parents:
196
diff
changeset
|
30 which does not build on 64 bit linux. |
182 | 31 |
196
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
32 In the event you have used the "official" gcc6809 with the default as6809 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
33 assembler that comes with it, you should be aware that while lwasm is mostly |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
34 compatible with it syntax wise, there are differences, particularly in |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
35 pseudo operations and source line syntax (most notably that you must have |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
36 whitespace preceeding assembler directives and instructions). You will |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
37 likely not run into these unless you are using inline asm. Refer to the |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
38 lwtools documentation for the specific line format required by lwasm. |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
39 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
40 It is worth noting that neither gcc6809 nor lwtools comes with a standard C |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
41 library. |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
42 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
43 It is also worth noting that for many projects, it will be more flexible to |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
44 invoke lwlink directly rather than using the ld script or gcc as a front |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
45 end. See the lwtools documentation for details on using lwlink. |
72
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
46 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
47 To use these scripts, you really need to understand how to build a gcc as a |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
48 cross compiler. The basics are that you put the as, ld, and ar scripts |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
49 whereever you plan to put your cross-development binaries. Then, when |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
50 building the cross compiler, you tell it where the scripts are. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
51 |
196
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
52 Please note that the following recipe is an example only. If you are |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
53 planning to install multiple instances of gcc6809 for different targets, you |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
54 will most certainly need to modify the steps below. Providing a complete |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
55 understanding of building a gcc toolchain for cross compilation is well |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
56 beyond the scope of this document. |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
57 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
58 The following works for a single installation. |
72
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
59 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
60 1. Install the ar, as, and ld scripts named m6809-unknown-{as,ar,ld} in a |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
61 directory in your path, say /usr/local/coco/bin/. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
62 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
63 2. Make symbolic links to /bin/true for similarly named nm, objdump, ranlib, |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
64 and strip in the same directory Some of these may not be necessary. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
65 |
182 | 66 3. Unpack gcc and apply the gcc6809 patch. The gcc6809lw* patch file |
67 in this directory is known to work with these instructions. | |
72
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
68 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
69 4. Make sure /usr/local/coco/bin is in your PATH |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
70 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
71 5. Make sure "." is NOT in your path or is at the END of PATH. If you have |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
72 gazillions of errors pop up compiling "gemodes.c", this is your problem. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
73 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
74 6. In a directory (other than the gcc source, say "gcc-build" at the same |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
75 level as the main gcc directory, do (assuming gcc 4.3.4): |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
76 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
77 configure --enable-languages=c --target=m6809-unknown \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
78 --program-prefix=m6809-unknown- --enable-obsolete \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
79 --srcdir=../gcc-4.3.4 --disable-threads --disable-nls \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
80 --disable-libssp --prefix=/usr/local/coco \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
81 --with-as=/usr/local/coco/bin/m6809-unknown-as \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
82 --with-ld=/usr/local/coco/bin/m6809-unknown-ld \ |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
83 --with-ar=/usr/local/coco/bin/m6809-unknown-ar |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
84 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
85 NOTE: the last three are required to prevent selection of the wrong binutils |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
86 programs at runtime. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
87 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
88 --with-sysroot might be useful if you have a C library involved. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
89 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
90 7. Run "make". If errors appear, troubleshoot. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
91 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
92 8. Run "make install". Note that you will have to have your PATH variable |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
93 for "root" set up correctly if your install prefix requires root privileges. |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
94 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
95 The above is WOMM certified. YMMV. |