Commit | Line | Data |
---|---|---|
7e5e7574 C |
1 | Groff has been compiled on a Sun 4 under SunOS 4.0.3 with g++ 1.37.1 |
2 | and with AT&T C++ 2.0, and on a 386 PC under 386/ix 2.0.1 with g++ | |
3 | 1.37.1 using Michael Bloom's GNU COFF patches. You may encounter | |
4 | problems on other machines that I cannot anticipate. | |
5 | ||
6 | If you are using g++, you will need to install the header files from | |
7 | libg++. The only other parts of libg++ used by groff are contained in | |
8 | the files xyzzy.c and gnulib3.c; the libg++.a that I use contains only | |
9 | xyzzy.o and gnulib3.o. You don't need xyzzy.o unless you're using GNU | |
10 | ld. | |
11 | ||
12 | If you are using g++ 1.37.2 alpha, you'll need the following fix (from | |
13 | Michael Tiemann): | |
14 | ||
15 | *** cplus-tree.c~ Sat Jun 23 16:10:41 1990 | |
16 | --- cplus-tree.c Sat Jun 30 23:45:09 1990 | |
17 | *************** | |
18 | *** 685,688 **** | |
19 | --- 685,689 ---- | |
20 | } | |
21 | ||
22 | + /* Constructor for hashed lists. */ | |
23 | tree | |
24 | hash_tree_chain (value, chain) | |
25 | *************** | |
26 | *** 701,705 **** | |
27 | --- 702,721 ---- | |
28 | } | |
29 | ||
30 | + /* Similar, but used for concatenating two lists. */ | |
31 | tree | |
32 | + hash_chainon (list1, list2) | |
33 | + tree list1, list2; | |
34 | + { | |
35 | + if (list2 == 0) | |
36 | + return list1; | |
37 | + if (list1 == 0) | |
38 | + return list2; | |
39 | + if (TREE_CHAIN (list1) == NULL_TREE) | |
40 | + return hash_tree_chain (TREE_VALUE (list1), list2); | |
41 | + return hash_tree_chain (TREE_VALUE (list1), | |
42 | + hash_chainon (TREE_CHAIN (list1), list2)); | |
43 | + } | |
44 | + | |
45 | + tree | |
46 | build_decl_list_1 (value) | |
47 | tree value; | |
48 | *************** | |
49 | *** 926,930 **** | |
50 | { | |
51 | if (DECL_NAME (decl)) | |
52 | ! return IDENTIFIER_POINTER (DECL_NAME (decl)); | |
53 | return "((anonymous))"; | |
54 | } | |
55 | --- 942,950 ---- | |
56 | { | |
57 | if (DECL_NAME (decl)) | |
58 | ! { | |
59 | ! if (THIS_NAME_P (DECL_NAME (decl))) | |
60 | ! return "this"; | |
61 | ! return IDENTIFIER_POINTER (DECL_NAME (decl)); | |
62 | ! } | |
63 | return "((anonymous))"; | |
64 | } | |
65 | *** cplus-parse.y~ Mon Jun 4 23:52:34 1990 | |
66 | --- cplus-parse.y Sat Jun 30 23:45:09 1990 | |
67 | *************** | |
68 | *** 501,505 **** | |
69 | error ("no base initializers given following ':'"); | |
70 | setup_vtbl_ptr (); | |
71 | ! } | |
72 | ; | |
73 | ||
74 | --- 501,505 ---- | |
75 | error ("no base initializers given following ':'"); | |
76 | setup_vtbl_ptr (); | |
77 | ! } | |
78 | ; | |
79 | ||
80 | *************** | |
81 | *** 1274,1278 **** | |
82 | { $$ = hash_tree_chain ($1, $2); } | |
83 | | declmods typespec reserved_declspecs | |
84 | ! { $$ = hash_tree_chain ($2, chainon ($3, $1)); } | |
85 | ; | |
86 | ||
87 | --- 1274,1278 ---- | |
88 | { $$ = hash_tree_chain ($1, $2); } | |
89 | | declmods typespec reserved_declspecs | |
90 | ! { $$ = hash_tree_chain ($2, hash_chainon ($3, $1)); } | |
91 | ; | |
92 | ||
93 | *************** | |
94 | *** 1319,1323 **** | |
95 | { $$ = decl_tree_cons (NULL_TREE, $1, $2); } | |
96 | | nonempty_type_quals typespec reserved_typespecquals | |
97 | ! { $$ = decl_tree_cons (NULL_TREE, $2, chainon ($3, $1)); } | |
98 | ; | |
99 | ||
100 | --- 1319,1323 ---- | |
101 | { $$ = decl_tree_cons (NULL_TREE, $1, $2); } | |
102 | | nonempty_type_quals typespec reserved_typespecquals | |
103 | ! { $$ = decl_tree_cons (NULL_TREE, $2, hash_chainon ($3, $1)); } | |
104 | ; | |
105 | ||
106 | ||
107 | If you're using g++ 1.39 on a sparc you'll probably want to apply the | |
108 | following fix (from Casper H.S. Dik): | |
109 | ||
110 | *** config/out-sparc.c.org Wed Dec 12 03:13:57 1990 | |
111 | --- config/out-sparc.c Sat Feb 23 23:21:26 1991 | |
112 | *************** | |
113 | *** 908,925 **** | |
114 | else if (GET_CODE (XEXP (operands[1], 0)) == PLUS) | |
115 | { | |
116 | rtx inc_reg = XEXP (XEXP (operands[1], 0), 0); | |
117 | if (inc_reg == frame_pointer_rtx | |
118 | && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == REG | |
119 | ! && XEXP (XEXP (operands[1], 0), 0) != frame_pointer_rtx) | |
120 | inc_reg = XEXP (XEXP (operands[1], 0), 1); | |
121 | if (inc_reg == frame_pointer_rtx) | |
122 | { | |
123 | output_asm_insn ("mov %%fp,%%g1", xoperands); | |
124 | inc_reg = gen_rtx (REG, SImode, 1); | |
125 | } | |
126 | xoperands[1] = inc_reg; | |
127 | output_asm_insn ("add 4,%1,%1", xoperands); | |
128 | ! xoperands[1] = operands[1]; | |
129 | output_asm_insn ("ld %1,%0", xoperands); | |
130 | xoperands[1] = inc_reg; | |
131 | output_asm_insn ("add -4,%1,%1", xoperands); | |
132 | --- 908,931 ---- | |
133 | else if (GET_CODE (XEXP (operands[1], 0)) == PLUS) | |
134 | { | |
135 | rtx inc_reg = XEXP (XEXP (operands[1], 0), 0); | |
136 | + rtx from = operands[1]; | |
137 | if (inc_reg == frame_pointer_rtx | |
138 | && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == REG | |
139 | ! && XEXP (XEXP (operands[1], 0), 1) != frame_pointer_rtx) | |
140 | inc_reg = XEXP (XEXP (operands[1], 0), 1); | |
141 | if (inc_reg == frame_pointer_rtx) | |
142 | { | |
143 | output_asm_insn ("mov %%fp,%%g1", xoperands); | |
144 | inc_reg = gen_rtx (REG, SImode, 1); | |
145 | + from = gen_rtx (GET_CODE (operands[1]), | |
146 | + GET_MODE (operands[1]), | |
147 | + gen_rtx (PLUS, GET_MODE (XEXP (operands[1], 0)), | |
148 | + inc_reg, | |
149 | + XEXP (XEXP (operands[1], 0), 1))); | |
150 | } | |
151 | xoperands[1] = inc_reg; | |
152 | output_asm_insn ("add 4,%1,%1", xoperands); | |
153 | ! xoperands[1] = from; | |
154 | output_asm_insn ("ld %1,%0", xoperands); | |
155 | xoperands[1] = inc_reg; | |
156 | output_asm_insn ("add -4,%1,%1", xoperands); | |
157 | *************** | |
158 | *** 989,1006 **** | |
159 | else if (GET_CODE (XEXP (operands[0], 0)) == PLUS) | |
160 | { | |
161 | rtx inc_reg = XEXP (XEXP (operands[0], 0), 0); | |
162 | if (inc_reg == frame_pointer_rtx | |
163 | && GET_CODE (XEXP (XEXP (operands[0], 0), 1)) == REG | |
164 | ! && XEXP (XEXP (operands[0], 0), 0) != frame_pointer_rtx) | |
165 | inc_reg = XEXP (XEXP (operands[0], 0), 1); | |
166 | if (inc_reg == frame_pointer_rtx) | |
167 | { | |
168 | output_asm_insn ("mov %%fp,%%g1", xoperands); | |
169 | inc_reg = gen_rtx (REG, SImode, 1); | |
170 | } | |
171 | xoperands[0] = inc_reg; | |
172 | output_asm_insn ("add 4,%0,%0", xoperands); | |
173 | ! xoperands[0] = operands[0]; | |
174 | output_asm_insn ("st %r1,%0", xoperands); | |
175 | xoperands[0] = inc_reg; | |
176 | output_asm_insn ("add -4,%0,%0", xoperands); | |
177 | --- 995,1018 ---- | |
178 | else if (GET_CODE (XEXP (operands[0], 0)) == PLUS) | |
179 | { | |
180 | rtx inc_reg = XEXP (XEXP (operands[0], 0), 0); | |
181 | + rtx to = operands[0]; | |
182 | if (inc_reg == frame_pointer_rtx | |
183 | && GET_CODE (XEXP (XEXP (operands[0], 0), 1)) == REG | |
184 | ! && XEXP (XEXP (operands[0], 0), 1) != frame_pointer_rtx) | |
185 | inc_reg = XEXP (XEXP (operands[0], 0), 1); | |
186 | if (inc_reg == frame_pointer_rtx) | |
187 | { | |
188 | output_asm_insn ("mov %%fp,%%g1", xoperands); | |
189 | inc_reg = gen_rtx (REG, SImode, 1); | |
190 | + to = gen_rtx (GET_CODE (operands[0]), | |
191 | + GET_MODE (operands[0]), | |
192 | + gen_rtx (PLUS, GET_MODE (XEXP (operands[0], 0)), | |
193 | + inc_reg, | |
194 | + XEXP (XEXP (operands[0], 0), 1))); | |
195 | } | |
196 | xoperands[0] = inc_reg; | |
197 | output_asm_insn ("add 4,%0,%0", xoperands); | |
198 | ! xoperands[0] = to; | |
199 | output_asm_insn ("st %r1,%0", xoperands); | |
200 | xoperands[0] = inc_reg; | |
201 | output_asm_insn ("add -4,%0,%0", xoperands); | |
202 | ||
203 | On a Sun 3 and other 68k machines, using libg++ 1.37.0 you will need | |
204 | to apply the following change to g++-include/math.h: | |
205 | ||
206 | *** math.h- Sat Jan 6 14:09:52 1990 | |
207 | --- math.h Tue Mar 13 02:07:01 1990 | |
208 | *************** | |
209 | *** 32,39 **** | |
210 | ||
211 | ||
212 | #ifdef __HAVE_68881__ /* MC68881/2 Floating-Point Coprocessor */ | |
213 | - #include <math-68881.h> | |
214 | extern "C" { /* fill in what we've left out */ | |
215 | ||
216 | double acosh(double); | |
217 | double asinh(double); | |
218 | --- 32,39 ---- | |
219 | ||
220 | ||
221 | #ifdef __HAVE_68881__ /* MC68881/2 Floating-Point Coprocessor */ | |
222 | extern "C" { /* fill in what we've left out */ | |
223 | + #include <math-68881.h> | |
224 | ||
225 | double acosh(double); | |
226 | double asinh(double); | |
227 | ||
228 | If you have bison 1.11, you will need to apply the following fix to | |
229 | bison.simple if you want change any of the grammars: | |
230 | ||
231 | *** bison.simple.~1~ Fri Aug 10 12:13:41 1990 | |
232 | --- bison.simple Fri Aug 10 12:24:46 1990 | |
233 | *************** | |
234 | *** 20,26 **** | |
235 | --- 20,28 ---- | |
236 | ||
237 | ||
238 | #ifdef __GNUC__ | |
239 | + #ifndef alloca | |
240 | #define alloca __builtin_alloca | |
241 | + #endif /* Not alloca. */ | |
242 | #else /* Not GNU C. */ | |
243 | #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) | |
244 | #include <alloca.h> | |
245 | *************** | |
246 | *** 114,123 **** | |
247 | --- 116,129 ---- | |
248 | /* This is the most reliable way to avoid incompatibilities | |
249 | in available built-in functions on various systems. */ | |
250 | static void | |
251 | + #ifdef __cplusplus | |
252 | + __yy_bcopy (char *from, char *to, int count) | |
253 | + #else | |
254 | __yy_bcopy (from, to, count) | |
255 | char *from; | |
256 | char *to; | |
257 | int count; | |
258 | + #endif | |
259 | { | |
260 | register char *f = from; | |
261 | register char *t = to; | |
262 | *************** | |
263 | *** 127,133 **** | |
264 | *t++ = *f++; | |
265 | } | |
266 | ||
267 | ! #line 131 "/usr/local/lib/bison.simple" | |
268 | int | |
269 | yyparse() | |
270 | { | |
271 | --- 133,139 ---- | |
272 | *t++ = *f++; | |
273 | } | |
274 | ||
275 | ! #line 137 "/usr/local/lib/bison.simple" | |
276 | int | |
277 | yyparse() | |
278 | { | |
279 | ||
280 | For gas 1.36 on a Sun 4, the following fix is desirable: | |
281 | ||
282 | *** sparc.c.~1~ Mon May 21 19:06:18 1990 | |
283 | --- sparc.c Sat Aug 11 11:09:12 1990 | |
284 | *************** | |
285 | *** 56,65 **** | |
286 | --- 56,67 ---- | |
287 | static struct hash_control *op_hash = NULL; | |
288 | ||
289 | static void s_seg(), s_proc(), s_data1(), s_reserve(), s_common(); | |
290 | + static void s_sparc_align(); | |
291 | extern void s_globl(), s_long(), s_short(), s_space(), cons(); | |
292 | ||
293 | pseudo_typeS | |
294 | md_pseudo_table[] = { | |
295 | + { "align", s_sparc_align, 0 }, | |
296 | { "common", s_common, 0 }, | |
297 | { "global", s_globl, 0 }, | |
298 | { "half", cons, 2 }, | |
299 | ||
300 | *** read.c.~1~ Tue Mar 6 21:08:29 1990 | |
301 | --- read.c Sat Aug 11 11:07:23 1990 | |
302 | *************** | |
303 | *** 175,181 **** | |
304 | --- 175,183 ---- | |
305 | potable[] = | |
306 | { | |
307 | { "abort", s_abort, 0 }, | |
308 | + #ifndef SPARC | |
309 | { "align", s_align, 0 }, | |
310 | + #endif | |
311 | { "ascii", stringer, 0 }, | |
312 | { "asciz", stringer, 1 }, | |
313 | { "byte", cons, 1 }, | |
314 | ||
315 | ||
316 | On a Sequent Symmetry S27 running Dynix 3.0.17, you'll need to use GNU | |
317 | make or add 'MAKE=make' to Makefiles which use $(MAKE). You'll also | |
318 | need to change | |
319 | ||
320 | dev=${GROFF_TYPESETTER:-@DEVICE@} | |
321 | ||
322 | to | |
323 | ||
324 | dev=$GROFF_TYPESETTER | |
325 | ||
326 | in groff.sh. You should use gcc to compile xditview. | |
327 | ||
328 | You should only have to edit the top-level Makefile. The comments | |
329 | should make it clear what has to be changed. If you don't have a | |
330 | separate directory tree for local manual pages you can make | |
331 | MAN[157]EXT be l (that's an ell) or n, and MANROOT be /usr/man. The | |
332 | changes you make to the top-level Makefile will be propagated to | |
333 | sub-makes, but this won't happen if you invoke make in the | |
334 | sub-directories. | |
335 | ||
336 | You might also need to edit groff.sh. This is a shell-script that | |
337 | runs gtroff, an appropriate postprocessor and optionally various | |
338 | preprocessors. (Actually, the shell-script is created from groff.sh | |
339 | by substituting for some variables surrounded by @s). If your kernel | |
340 | doesn't understand #!, you will need to arrange for the script to be | |
341 | run by /bin/sh in some other way. | |
342 | ||
343 | If you want to use existing troff drivers you should change groff.sh | |
344 | so that it recognises them. It is also a good idea to copy over the | |
345 | dev* directory for the device into a directory that's only searched by | |
346 | groff (eg /usr/local/lib/groff/font), so that you can take advantage | |
347 | of the groff extensions to the DESC and font formats. Groff only uses | |
348 | the ASCII versions of the device files so you only need copy them. If | |
349 | you want to use GNU eqn, it is essential that the font files contain | |
350 | correct height and depth information. The format for this information | |
351 | is described in the groff_font(5) page. The best way to add this | |
352 | information is to modify the program that generates the font files. | |
353 | As a last resort you could try using the program addftinfo: it | |
354 | attempts to guess plausible heights and depths. To obtain good | |
355 | results you would probably have to do more work on addftinfo. | |
356 | ||
357 | To compile everything, just do a `make'. If that works, then do a | |
358 | `make install'. | |
359 | ||
360 | If you have problems compiling pic/pic.tab.c or eqn/eqn.tab.c, you might | |
361 | want to try using your system's yacc. Set YACC=yacc in the top-level | |
362 | Makefile, and also do | |
363 | ||
364 | mv pic/pic.tab.c pic/pic.tab.c.dist | |
365 | mv eqn/eqn.tab.c eqn/eqn.tab.c.dist | |
366 | ||
367 | so that the parsers will be regenerated using yacc (the supplied | |
368 | *.tab.[ch] files were generated by bison.) | |
369 | ||
370 | If you want to install xditview, you'll need to do that separately: | |
371 | change directory to xditview, edit the Makefile, do a make and a make | |
372 | install. You'll need to be running X11R4. | |
373 | ||
374 | The dvi files produced by grodvi can use fonts at non-standard | |
375 | magnifications. You may need to compile fonts with Metafont at these | |
376 | magnifications. The CompileFonts script in the dvi/devdvi directory | |
377 | may help you to do this. (It will take a *long* time.) | |
378 | ||
379 | If you have problems printing existing troff documents, read the | |
380 | section on `Incompatbilities' in gtroff(1). If you have existing | |
381 | macro packages that are in the habit of omitting the space between a | |
382 | macro or request and its arguments, it is good idea to produce a | |
383 | version with spaces so that you can use it with groff (without having | |
384 | to use the -C flag). The file macros/fixmacros.sed is a sed script | |
385 | which will attempt to edit a file of macros so that it can be used | |
386 | with groff without the -C flag. If you have the DWB 2.0 mm macros | |
387 | installed on your machine, you might want to do a `make install.mm'; | |
388 | this will copy the mm macros to groff's macro directory and fix a few | |
389 | problems that occur when using the mm macros with groff; this requires | |
390 | the `patch' program. If the patch in macros/mm.diff is rejected, | |
391 | carefully apply it by hand. | |
392 | ||
393 | You can share groff with a friend who has the same type of machine as | |
394 | you, but does not have a C++ compiler. First do `make bindist'; this | |
395 | will create a subdirectory `bindist' containing a set of binaries, a | |
396 | Makefile and a README. If you want to strip the binaries, now do a | |
397 | `make strip' in the bindist directory. Rename the bindist directory | |
398 | to something more meaningful, tar it up, and give to your friend along | |
399 | with the original groff source distribution. Your friend can then | |
400 | install groff just by editing the Makefile in the bindist directory | |
401 | and doing a make there; this will automatically install the non-binary | |
402 | parts of the groff source distribution as well as the binaries from | |
403 | the bindist directory. |