Mercurial > hg > index.cgi
annotate extra/README @ 273:1409debcb1a0
Fix crash on listing when nested noexpand macros are used
Macros flagged noexpand were causing a segfault during listing. The problem
was incorrect accounting for nesting levels for noexpand macros causing the
listing handler to fall off the end of the program in certain circumstances
and in other circumstances it would fail to suppress expansion. Both the
segfault in the case of misbehaviour and the misbhaviour itself are
corrected with this update.
If you do not use nested noexpand macros, this bug has no effect.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 25 May 2013 13:35:46 -0600 |
parents | 83bb31ca8b6a |
children | b0fb675d1ed4 |
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 |
20 | |
21 These are patches to the main gcc source distribution for specific releases. | |
22 The last number after the dash is a patch level for the specific patch. | |
23 These are different to the official gcc6809 releases in the following ways. | |
24 First, all the source for as-6809 is removed. Also, the special "helper" | |
196
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
25 makefile and directory is removed. Also, as of this writing, the latest |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
26 "official" release was for gcc 4.3.4 which does not build on 64 bit linux. |
182 | 27 |
196
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
28 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
|
29 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
|
30 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
|
31 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
|
32 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
|
33 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
|
34 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
|
35 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
36 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
|
37 library. |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
38 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
39 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
|
40 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
|
41 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
|
42 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
43 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
|
44 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
|
45 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
|
46 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
|
47 |
196
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
48 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
|
49 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
|
50 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
|
51 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
|
52 beyond the scope of this document. |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
53 |
83bb31ca8b6a
Elaborated the readme for the gcc6809 patch
William Astle <lost@l-w.ca>
parents:
182
diff
changeset
|
54 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
|
55 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
56 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
|
57 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
|
58 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
59 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
|
60 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
|
61 |
182 | 62 3. Unpack gcc and apply the gcc6809 patch. The gcc6809lw* patch file |
63 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
|
64 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
65 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
|
66 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
67 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
|
68 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
|
69 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
70 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
|
71 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
|
72 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
73 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
|
74 --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
|
75 --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
|
76 --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
|
77 --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
|
78 --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
|
79 --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
|
80 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
81 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
|
82 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
|
83 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
84 --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
|
85 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
86 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
|
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 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
|
89 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
|
90 |
84eb35251849
Added extra scripts that can be used to run gcc6809 with lwtools as its binutils
lost@l-w.ca
parents:
diff
changeset
|
91 The above is WOMM certified. YMMV. |