NameDateSize

..27-Sep-201339

.gdbinitH A D22-Nov-20122 KiB

.gitignoreH A D22-Nov-201238

ABOUT-GCC-NLSH A D22-Nov-201217.8 KiB

ABOUT-NLSH A D22-Nov-201211.4 KiB

acconfig.hH A D22-Nov-20124.1 KiB

aclocal.m4H A D22-Nov-201219.8 KiB

alias.cH A D22-Nov-201247.2 KiB

assert.hH A D22-Nov-20121.5 KiB

basic-block.hH A D22-Nov-20128.8 KiB

beos-specific/H22-Nov-20123

bitmap.cH A D22-Nov-201215.2 KiB

bitmap.hH A D22-Nov-201210.3 KiB

BUGSH A D22-Nov-20121.1 KiB

build-makeH A D22-Nov-20121 KiB

c-aux-info.cH A D22-Nov-201222.8 KiB

c-common.cH A D22-Nov-201298.8 KiB

c-convert.cH A D22-Nov-20123.4 KiB

c-decl.cH A D22-Nov-2012235.8 KiB

c-gperf.hH A D22-Nov-20126.6 KiB

c-iterate.cH A D22-Nov-201216.2 KiB

c-lang.cH A D22-Nov-20124.4 KiB

c-lex.cH A D22-Nov-201258.1 KiB

c-lex.hH A D22-Nov-20122.3 KiB

c-parse.cH A D22-Nov-2012152 KiB

c-parse.gperfH A D22-Nov-20122.3 KiB

c-parse.hH A D22-Nov-20121.3 KiB

c-parse.inH A D22-Nov-201285.7 KiB

c-parse.yH A D22-Nov-201267.3 KiB

c-pragma.cH A D22-Nov-201211 KiB

c-pragma.hH A D22-Nov-20122.7 KiB

c-tree.hH A D22-Nov-201222.6 KiB

c-typeck.cH A D22-Nov-2012208.4 KiB

caller-save.cH A D22-Nov-201222.5 KiB

calls.cH A D22-Nov-2012126.3 KiB

cccp.1H A D22-Nov-201215.3 KiB

cccp.cH A D05-Sep-2017299.2 KiB

cexp.cH A D22-Nov-201256.6 KiB

cexp.yH A D22-Nov-201228.3 KiB

ch/H22-Nov-201239

ChangeLogH A D22-Nov-2012648.5 KiB

ChangeLog.0H A D22-Nov-2012461.8 KiB

ChangeLog.libH A D22-Nov-2012130.8 KiB

collect2.cH A D22-Nov-201295.8 KiB

collect2.hH A D22-Nov-20121.2 KiB

combine.cH A D22-Nov-2012403 KiB

conditions.hH A D22-Nov-20124.5 KiB

config/H16-Oct-2014100

config.guessH A D22-Nov-2012159

config.inH A D22-Nov-201211.6 KiB

configureH A D27-Jul-2014241.2 KiB

configure.batH A D22-Nov-2012440

configure.fragH A D22-Nov-20121.7 KiB

configure.inH A D28-Jul-2014112 KiB

configure.langH A D22-Nov-20127 KiB

convert.cH A D22-Nov-201213.5 KiB

convert.hH A D22-Nov-20121,000

COPYINGH A D22-Nov-201217.6 KiB

COPYING.LIBH A D22-Nov-201224.7 KiB

cp/H22-Nov-201259

cpp.1H A D22-Nov-201216

cpp.fnsH A D22-Nov-20122.8 KiB

cpp.texiH A D22-Nov-2012109.2 KiB

cppalloc.cH A D22-Nov-20122 KiB

cpperror.cH A D22-Nov-20124.8 KiB

cppexp.cH A D22-Nov-201226.2 KiB

cppfiles.cH A D22-Nov-201241.5 KiB

cpphash.cH A D22-Nov-201246 KiB

cpphash.hH A D22-Nov-20122.5 KiB

cppinit.cH A D22-Nov-201252.3 KiB

cpplib.cH A D22-Nov-201280 KiB

cpplib.hH A D22-Nov-201226.5 KiB

cppmain.cH A D22-Nov-20123 KiB

cppspec.cH A D22-Nov-20126.2 KiB

cppulp.cH A D22-Nov-2012988

cross-makeH A D22-Nov-2012645

crtstuff.cH A D22-Nov-201218.4 KiB

cse.cH A D22-Nov-2012281.5 KiB

cstamp-h.inH A D22-Nov-201210

dbxout.cH A D22-Nov-201281 KiB

dbxout.hH A D22-Nov-20121.4 KiB

dbxstclass.hH A D22-Nov-2012427

defaults.hH A D22-Nov-20125.3 KiB

doprint.cH A D22-Nov-20127.2 KiB

doschk.cH A D22-Nov-20126.7 KiB

dostage2H A D22-Nov-201292

dostage3H A D22-Nov-201293

dwarf.hH A D22-Nov-20129.9 KiB

dwarf2.hH A D22-Nov-201214 KiB

dwarf2out.cH A D22-Nov-2012305.4 KiB

dwarf2out.hH A D22-Nov-20121.7 KiB

dwarfout.cH A D22-Nov-2012201.9 KiB

dwarfout.hH A D22-Nov-20121.7 KiB

dyn-string.cH A D22-Nov-20122.4 KiB

dyn-string.hH A D22-Nov-20121.3 KiB

eh-common.hH A D22-Nov-20124.5 KiB

emit-rtl.cH A D22-Nov-2012104.5 KiB

enquire.cH A D22-Nov-201278.3 KiB

except.cH A D22-Nov-201291.8 KiB

except.hH A D22-Nov-201212.7 KiB

exgettextH A D22-Nov-20123.1 KiB

explow.cH A D22-Nov-201242.8 KiB

expmed.cH A D22-Nov-2012142.7 KiB

expr.cH A D22-Nov-2012368.7 KiB

expr.hH A D22-Nov-201237.7 KiB

extend.texiH A D22-Nov-2012146.2 KiB

f/H22-Nov-2012134

final.cH A D22-Nov-2012112.7 KiB

fix-header.cH A D22-Nov-201235.7 KiB

fixcppH A D22-Nov-20122.3 KiB

fixinc/H22-Nov-201233

fixinc-nt.sedH A D22-Nov-2012225

fixincludesH A D22-Nov-2012112.5 KiB

fixprotoH A D22-Nov-201210.1 KiB

flags.hH A D22-Nov-201216.7 KiB

floatlib.cH A D22-Nov-201217.4 KiB

flow.cH A D22-Nov-2012149.5 KiB

fold-const.cH A D22-Nov-2012203.8 KiB

fp-test.cH A D22-Nov-20124.7 KiB

frame.cH A D22-Nov-201221.6 KiB

frame.hH A D22-Nov-20123 KiB

FSFChangeLogH A D22-Nov-201281 KiB

FSFChangeLog.10H A D22-Nov-2012381.3 KiB

FSFChangeLog.11H A D22-Nov-2012550 KiB

fullpath.cH A D22-Nov-20122.1 KiB

function.cH A D22-Nov-2012219.3 KiB

function.hH A D22-Nov-20129 KiB

future.optionsH A D22-Nov-2012711

gansidecl.hH A D22-Nov-20122.9 KiB

gbl-ctors.hH A D22-Nov-20123.3 KiB

gcc.1H A D22-Nov-2012106.8 KiB

gcc.cH A D27-Sep-2013161.8 KiB

gcc.hlpH A D22-Nov-201213.9 KiB

gcc.texiH A D22-Nov-2012185.1 KiB

gccspec.cH A D22-Nov-20121.4 KiB

gcov-io.hH A D22-Nov-20123.6 KiB

gcov.cH A D22-Nov-201237.8 KiB

gcov.texiH A D22-Nov-201213.6 KiB

gcse.cH A D22-Nov-2012128.3 KiB

gen-protos.cH A D22-Nov-20124.3 KiB

genattr.cH A D22-Nov-201212.3 KiB

genattrtab.cH A D22-Nov-2012167 KiB

gencheck.cH A D22-Nov-20122 KiB

gencodes.cH A D22-Nov-20123.9 KiB

genconfig.cH A D22-Nov-20129.2 KiB

genemit.cH A D22-Nov-201221.7 KiB

genextract.cH A D22-Nov-201213.2 KiB

genflags.cH A D22-Nov-20127 KiB

gengenrtl.cH A D22-Nov-20127.5 KiB

genmultilibH A D22-Nov-20128.8 KiB

genopinit.cH A D22-Nov-201212.2 KiB

genoutput.cH A D22-Nov-201228.2 KiB

genpeep.cH A D22-Nov-201212.5 KiB

genrecog.cH A D22-Nov-201255 KiB

getpwd.cH A D22-Nov-20122 KiB

ginclude/H22-Nov-201230

glimits.hH A D22-Nov-20122.5 KiB

global.cH A D22-Nov-201257.7 KiB

gmon.cH A D22-Nov-20128.6 KiB

graph.cH A D22-Nov-201210.4 KiB

gstab.hH A D22-Nov-2012259

gsyms.hH A D22-Nov-20121.2 KiB

gsyslimits.hH A D22-Nov-2012330

gthr-beos.hH A D22-Nov-20122.4 KiB

gthr-dce.hH A D22-Nov-20123.5 KiB

gthr-posix.hH A D22-Nov-20123.5 KiB

gthr-single.hH A D22-Nov-20121.8 KiB

gthr-solaris.hH A D22-Nov-20124 KiB

gthr-vxworks.hH A D22-Nov-20123.7 KiB

gthr.hH A D22-Nov-20123.6 KiB

haifa-sched.cH A D22-Nov-2012252.9 KiB

halfpic.cH A D22-Nov-20128.9 KiB

halfpic.hH A D22-Nov-20123 KiB

hard-reg-set.hH A D22-Nov-201216.6 KiB

hash.cH A D22-Nov-20125.7 KiB

hash.hH A D22-Nov-20124.6 KiB

hwint.hH A D22-Nov-20122.7 KiB

input.hH A D22-Nov-20121.5 KiB

INSTALLH A D22-Nov-201295.1 KiB

install.texiH A D22-Nov-201298.1 KiB

install1.texiH A D22-Nov-2012547

integrate.cH A D22-Nov-2012112.3 KiB

integrate.hH A D22-Nov-20126 KiB

intl/H22-Nov-201225

intl.cH A D22-Nov-2012115

intl.hH A D22-Nov-20121.4 KiB

invoke.texiH A D22-Nov-2012264.9 KiB

java/H22-Nov-201252

jump.cH A D22-Nov-2012154.1 KiB

just-fixincH A D22-Nov-20121.3 KiB

LANGUAGESH A D22-Nov-20123.8 KiB

lcm.cH A D22-Nov-201222.3 KiB

libgcc1-test.cH A D22-Nov-20122 KiB

libgcc1.cH A D22-Nov-201211.1 KiB

libgcc2.cH A D22-Nov-201296.6 KiB

limitx.hH A D22-Nov-2012455

limity.hH A D22-Nov-2012270

listingH A D22-Nov-20125.6 KiB

local-alloc.cH A D22-Nov-201271.9 KiB

longlong.hH A D22-Nov-201237.9 KiB

loop.cH A D22-Nov-2012303.7 KiB

loop.hH A D22-Nov-201210.4 KiB

machmode.defH A D22-Nov-20125.2 KiB

machmode.hH A D22-Nov-20125.2 KiB

make-l2.comH A D22-Nov-20124.5 KiB

Makefile.inH A D27-Sep-2013127.7 KiB

makefile.vmsH A D22-Nov-201211.3 KiB

mbchar.cH A D22-Nov-20128.4 KiB

mbchar.hH A D22-Nov-20121.5 KiB

md.texiH A D22-Nov-2012166.4 KiB

mips-tdump.cH A D22-Nov-201241.9 KiB

mips-tfile.cH A D22-Nov-2012159.5 KiB

mkinstalldirsH A D22-Nov-2012728

move-if-changeH A D22-Nov-2012229

NEWSH A D22-Nov-201269.2 KiB

objc/H22-Nov-201213

ONEWSH A D22-Nov-201240.4 KiB

optabs.cH A D22-Nov-2012138.2 KiB

output.hH A D22-Nov-201218.7 KiB

patch-apollo-includesH A D22-Nov-20121.5 KiB

pcp.hH A D22-Nov-20123.1 KiB

po/H22-Nov-20127

prefix.cH A D22-Nov-20128.3 KiB

prefix.hH A D22-Nov-20121 KiB

print-rtl.cH A D22-Nov-201211.3 KiB

print-tree.cH A D22-Nov-201219.8 KiB

PROBLEMSH A D22-Nov-20124.8 KiB

profile.cH A D22-Nov-201252.7 KiB

protoize.cH A D22-Nov-2012144.8 KiB

pself.cH A D22-Nov-201297

pself1.cH A D22-Nov-201268

pself2.cH A D22-Nov-201298

pself3.cH A D22-Nov-201265

pself4.cH A D22-Nov-2012176

pself5.cH A D22-Nov-2012298

READMEH A D22-Nov-20121.1 KiB

README-bugsH A D22-Nov-20126.1 KiB

README-fixincH A D22-Nov-2012495

README.ACORNH A D22-Nov-2012738

README.ALTOSH A D22-Nov-20121.8 KiB

README.APOLLOH A D22-Nov-20123 KiB

README.C4XH A D22-Nov-20122 KiB

README.DWARFH A D22-Nov-201227.9 KiB

README.FRESCOH A D22-Nov-2012625

README.gnatH A D22-Nov-201213.7 KiB

README.NS32KH A D22-Nov-20127.2 KiB

README.RS6000H A D22-Nov-20126.7 KiB

README.TRADH A D22-Nov-20121.9 KiB

README.X11H A D22-Nov-201213.7 KiB

real.cH A D22-Nov-2012140.9 KiB

real.hH A D22-Nov-201217.1 KiB

recog.cH A D22-Nov-201271.7 KiB

recog.hH A D22-Nov-20127.6 KiB

reg-stack.cH A D22-Nov-201287.1 KiB

regclass.cH A D22-Nov-201263.5 KiB

regmove.cH A D22-Nov-201266.1 KiB

regs.hH A D22-Nov-20128.2 KiB

reload.cH A D22-Nov-2012223.8 KiB

reload.hH A D22-Nov-201213.1 KiB

reload1.cH A D22-Nov-2012333.4 KiB

reorg.cH A D22-Nov-2012116 KiB

resource.cH A D22-Nov-201238.6 KiB

resource.hH A D22-Nov-20121.9 KiB

rtl.cH A D22-Nov-201223.8 KiB

rtl.defH A D22-Nov-201238.3 KiB

rtl.hH A D22-Nov-201264.8 KiB

rtl.texiH A D22-Nov-2012120.5 KiB

rtlanal.cH A D22-Nov-201255.8 KiB

sbitmap.cH A D22-Nov-201210 KiB

sbitmap.hH A D22-Nov-20124.4 KiB

scan-decls.cH A D22-Nov-20126.7 KiB

scan-types.shH A D22-Nov-20124.9 KiB

scan.cH A D22-Nov-20124.3 KiB

scan.hH A D22-Nov-20122.5 KiB

sched.cH A D22-Nov-2012134.4 KiB

sdbout.cH A D22-Nov-201247 KiB

sdbout.hH A D22-Nov-20121.5 KiB

SERVICEH A D22-Nov-201254.4 KiB

sort-protosH A D22-Nov-2012293

stab.defH A D22-Nov-20128.9 KiB

stack.hH A D22-Nov-20121.4 KiB

stmt.cH A D22-Nov-2012184.5 KiB

stor-layout.cH A D22-Nov-201244.3 KiB

stupid.cH A D22-Nov-201223.5 KiB

sys-protos.hH A D22-Nov-201275.2 KiB

sys-types.hH A D22-Nov-20124.2 KiB

system.hH A D22-Nov-201213.2 KiB

TESTS.FLUNKH A D22-Nov-20121.3 KiB

texinfo.texH A D22-Nov-2012174.5 KiB

tlink.cH A D22-Nov-201216.8 KiB

tm.texiH A D22-Nov-2012323.3 KiB

toplev.cH A D22-Nov-2012158.8 KiB

toplev.hH A D22-Nov-20124.4 KiB

tree.cH A D22-Nov-2012138.5 KiB

tree.defH A D22-Nov-201237.2 KiB

tree.hH A D22-Nov-201290.2 KiB

typeclass.hH A D22-Nov-2012467

unprotoize.cH A D22-Nov-201241

unroll.cH A D22-Nov-2012137 KiB

varasm.cH A D22-Nov-2012121 KiB

varray.cH A D22-Nov-20122.1 KiB

varray.hH A D22-Nov-20127.3 KiB

version.cH A D05-Sep-201750

vmsconfig.comH A D22-Nov-201217 KiB

xcoffout.cH A D22-Nov-201213.5 KiB

xcoffout.hH A D22-Nov-20127.2 KiB

README

1This directory contains the GNU Compiler Collection (GCC) version 2.95.
2It includes all of the support for compiling C, C++, Objective C, Fortran,
3Java, and Chill.
4
5The GNU Compiler Collection is free software.  See the file COPYING for copying
6permission.
7
8See the file gcc.texi (together with other files that it includes) for
9installation and porting information.  The file INSTALL contains a
10copy of the installation information, as plain ASCII.
11
12Installing this package will create various files in subdirectories of
13/usr/local/lib, which are passes used by the compiler and a library
14named libgcc.a.  It will also create /usr/local/bin/gcc, which is
15the user-level command to do a compilation.
16
17See the Bugs chapter of the GCC Manual for how to report bugs
18usefully.  An online readable version of the manual is in the files
19gcc.info*.
20
21The files pself.c and pself1.c are not part of GCC.
22They are programs that print themselves on standard output.
23They were written by Dario Dariol and Giovanni Cozzi, and are
24included for your hacking pleasure.  Likewise pself2.c
25(Who is the author of that?) and pself3.c (by Vlad Taeerov and Rashit
26Fakhreyev).
27

README-bugs

1The purpose of GCC pretesting is to verify that the new GCC
2distribution, about to be released, works properly on your system *with
3no change whatever*, when installed following the precise
4recommendations that come with the distribution.
5
6Here are some guidelines on how to do pretesting so as to make it
7helpful.  All of them follow from common sense together with the
8nature of the purpose and the situation.
9
10* It is absolutely vital that you mention even the smallest change or
11departure from the standard sources and installation procedure.
12
13Otherwise, you are not testing the same program that I wrote.  Testing
14a different program is usually of no use whatever.  It can even cause
15trouble if you fail to tell me that you tested some other program
16instead of what I know as GCC.  I might think that GCC works, when in
17fact it has not been properly tried, and might have a glaring fault.
18
19* Even changing the compilation options counts as a change in the
20program.  The GCC sources specify which compilation options to use.
21Some of them are specified in makefiles, and some in machine-specific
22configuration files.
23
24You have ways to override this--but if you do, then you are not
25testing what ordinary users will do.  Therefore, when pretesting, it
26is vital to test with the default compilation options.
27
28(It is okay to test with nonstandard options as well as testing with
29the standard ones.)
30
31* The machine and system configuration files of GCC are parts of
32GCC.  So when you test GCC, you need to do it with the
33configuration files that come with GCC.
34
35If GCC does not come with configuration files for a certain machine,
36and you test it with configuration files that don't come with GCC,
37this is effectively changing GCC.  Because the crucial fact about
38the planned release is that, without changes, it doesn't work on that
39machine.
40
41To make GCC work on that machine, I would need to install new
42configuration files.  That is not out of the question, since it is
43safe--it certainly won't break any other machines that already work.
44But you will have to rush me the legal papers to give the FSF
45permission to use a large piece of text.
46
47* Look for recommendations for your system.
48
49You can find these recommendations in the Installation node of the
50manual, and in the file INSTALL.  (These two files have the same text.)
51
52These files say which configuration name to use for your machine, so
53use the ones that are recommended.  If you guess, you might guess
54wrong and encounter spurious difficulties.  What's more, if you don't
55follow the recommendations then you aren't helping to test that its
56recommendations are valid.
57
58These files may describe other things that you need to do to make GCC
59work on your machine.  If so, you should follow these recommendations
60also, for the same reason.
61
62Also look at the Trouble chapter of the manual for items that
63pertain to your machine.
64
65* Don't delay sending information.
66
67When you find a problem, please double check it if you can do so
68quickly.  But don't spend a long time double-checking.  A good rule is
69always to tell me about every problem on the same day you encounter
70it, even if that means you can't find a solution before you report the
71problem.
72
73I'd much rather hear about a problem today and a solution tomorrow
74than get both of them tomorrow at the same time.
75
76* Make each bug report self-contained.
77
78If you refer back to another message, whether from you or from someone
79else, then it will be necessary for anyone who wants to investigate
80the bug to find the other message.  This may be difficult, it is
81probably time-consuming.
82
83To help me save time, simply copy the relevant parts of any previous
84messages into your own bug report.
85
86In particular, if I ask you for more information because a bug report
87was incomplete, it is best to send me the *entire* collection of
88relevant information, all together.  If you send just the additional
89information, that makes me do extra work.  There is even a risk that
90I won't remember what question you are sending me the answer to.
91
92* Always be precise when talking about changes you have made.  Show
93things rather than describing them.  Use exact filenames (relative to
94the main directory of the distribution), not partial ones.  For
95example, say "I changed Makefile" rather than "I changed the
96makefile".  Instead of saying "I defined the MUMBLE macro", send a
97diff that shows your change.
98
99* Always use `diff -c' to make diffs.  If you don't include context,
100it may be hard for me to figure out where you propose to make the
101changes.  I might have to ignore your patch because I can't tell what
102it means.
103
104* When you write a fix, keep in mind that I can't install a change
105that would break other systems.
106
107People often suggest fixing a problem by changing machine-independent
108files such as toplev.c to do something special that a particular
109system needs.  Sometimes it is totally obvious that such changes would
110break GCC for almost all users.  I can't possibly make a change like
111that.  All I can do is send it back to you and ask you to find a fix
112that is safe to install.
113
114Sometimes people send fixes that *might* be an improvement in
115general--but it is hard to be sure of this.  I can install such
116changes some of the time, but not during pretest, when I am trying to
117get a new version to work reliably as quickly as possible.
118
119The safest changes for me to install are changes to the configuration
120files for a particular machine.  At least I know those can't create
121bugs on other machines.
122
123* Don't try changing GCC unless it fails to work if you don't change it.
124
125* Don't even suggest changes that would only make GCC cleaner.
126Every change I install could introduce a bug, so I won't install
127a change unless I see it is necessary.
128
129* If you would like to suggest changes for purposes other than fixing
130serious bugs, don't wait till pretest time.  Instead, send them just
131after I make a release.  That's the best time for me to install them.
132
133* In some cases, if you don't follow these guidelines, your
134information might still be useful, but I might have to do more work to
135make use of it.  Unfortunately, I am so far behind in my work that I
136just can't get the job done unless you help me to do it efficiently.
137
138
139				Thank you
140				   rms
141
142Local Variables:
143mode: text
144End:
145

README-fixinc

1This README file is copied into the directory for GCC-only header files
2when fixincludes is run by the makefile for GCC.
3
4Many of the files in this directory were made from the standard system
5header files of this system by the shell script `fixincludes'.
6They are system-specific, and will not work on any other kind of system.
7They are also not part of GCC.  The reason for making the files here
8is to fix the places in the header files which use constructs
9that are incompatible with ANSI C.
10

README.ACORN

1Specifying the -g flag to GCC on a RISC iX machine requires upgrading the 
2standard assembler distributed with both RISC iX 1.1 and RISC iX 1.2 with a 
3replacement that is available from Acorn.  This version of the assembler is
4also an order of magnitude faster when assembling to an NFS mounted 
5file-system.
6
7Users of RISC iX 1.2 and above can obtain a copy of the assembler from the 
8following places:
9
101) Via ftp from acorn.acorn.co.uk, directory pub/riscix.
11
122) From Acorn Customer Services.
13
143) From Granada Microcare.
15
16Users of versions of RISC iX prior 1.2 should contact Acorn Customer Services;
17the assembler available on the net will not work with these versions due to
18changes in the shared libraries and system call numbers.
19

README.ALTOS

1Since COFF-encapsulation is obsolete, this may not be needed anymore.
2
3Return-Path: <jkp@sauna.hut.fi>
4Date: Mon, 10 Apr 89 10:13:45 +0300
5From: Jyrki Kuoppala <jkp@sauna.hut.fi>
6Sender: jkp@sauna.hut.fi
7To: info-gcc@prep.ai.mit.edu
8Subject: Kernel fix needed for Altos 3068 to get coff-encapsulation working right
9Organization: Helsinki University of Technology, Finland.
10
11Here's a description how to fix a kernel bug in Altos 3068 and get
12gcc-compiled programs working.
13
14Author: Jyrki Kuoppala (jkp@cs.hut.fi)
15Last modified: Mon Apr 10 09:28:40 1989
16
17There's a bug in the Altos 3068 kernel that causes gcc-compiled
18programs to fail in certain situations when the machine has a heavy
19load and also in some other situations.  The bug exists at least in
20SVR 2.2 1.0gT1 and SVR 2.2 1.0e.
21
22If you have source code to your system, apply the following change to
23os/exec.c (function gethead):
24
25Change the lines containing
26
27		u.u_exdata.ux_tstart = sizeof(struct naout) +
28			sizeof(struct filhd) + (ep->ef.nscns * sizeof(struct scnhdr));
29
30to
31
32		u.u_exdata.ux_tstart = u.u_exdata.ux_txtorg;
33
34If you only have binary, use sdb to find out the address of the
35previous lines (on our system it's gethead+0x140) and use your
36favourite binary editor to change the bytes '3036 0162 fffc 0002 0280
370000' to '23f9 01fb f4ca 01fb f4c2 6016'.  This may or may not work in
38your case, depending on the version of the operating system and the
39phase of the moon.
40
41Here's what is just before gethead+0x140 to ease finding out the right place:
42
430x9224 (gethead+0x122):         23f9 01fb f4ca 01fb f4ce mov.l &0x1fbf4ca.L,&0
44x1fbf4ce.L      []
450x922e (gethead+0x12c):         23f9 01fb f4c6 01fb f4ca mov.l &0x1fbf4c6.L,&0
46x1fbf4ca.L      []
470x9238 (gethead+0x136):         23f9 01fb f4c2 01fb f4c6 mov.l &0x1fbf4c2.L,&0
48x1fbf4c6.L      []
49
50Good luck !
51
52//Jyrki
53
54jkp@cs.hut.fi
55
56

README.APOLLO

1README.apollo
2
3Building GCC 2.0 for 680x0 based Apollo systems requires the GNU
4assembler (GAS) version 1.38.1, with John Vasta's patches applied.
5
6If you haven't done so yet, get `gas-1.38.1.tar.Z' from your favourite
7GNU distribution site.  Furthermore, get `apollo-gas-1.38.1.diffs'
8from `labrea.stanford.edu:/pub/gnu', apply the patches, compile and
9install gas (under the name as).  This should go through without any
10problems.
11
12After switching into the BSD environment, you can configure GCC 2.0
13with the command 
14
15% ./configure m68k-apollo-bsd
16
17The Apollo's `/usr/include/setjmp.h' uses a nonstandard `#options()'
18construct.  You should create a local copy of this file and remove
19these constructs from the declarations of SIGSETJMP and SIGLONGJMP.
20
21The Apollo's `/usr/include/sys/types.h' (BSD Version) doesn't allow
22to test for the definition of `size_t'.  This should be fixed by
23
24  #ifndef _SIZE_T
25  #define _SIZE_T
26  typedef	long	size_t;
27  #endif
28
29The script `patch-apollo-includes' fixes these two problems, but does
30_not_ pretend to be a full fledged `fixincludes' for this system.
31
32If you now follow the standard GCC installation instructions, building
33GCC 2.0 (including G++ 2.0) should proceed without any problems.
34
35NB: Debugging is not yet supported for the Apollo.  If someone wants
36    to do a _big_ favour to the Apollo users, he/she should consider
37    porting the Binary File Description library (BFD) to the Apollo.
38    This library can be found in the gdb-4.x distributions or in the
39    binutils-1.9x distributions.
40
41
42
43
44#!/bin/sh
45# patch-apollo-includes -- fix some (but not all!) Apollo brain damage.
46
47FILES_TO_PATCH='sys/types.h setjmp.h'
48
49mkdir sys
50
51for i in $FILES_TO_PATCH;
52do
53  cp /bsd4.3/usr/include/$i ./$i
54done
55
56patch -b -apollo <<'EOP'
57*** /bsd4.3/usr/include/sys/types.h	Fri Apr  8 20:29:06 1988
58--- sys/types.h	Wed Feb 26 21:17:57 1992
59***************
60*** 38,44 ****
61--- 38,47 ----
62  typedef	char *	caddr_t;
63  typedef	u_long	ino_t;
64  typedef	long	swblk_t;
65+ #ifndef _SIZE_T
66+ #define _SIZE_T
67  typedef	long	size_t;
68+ #endif
69  typedef	long	time_t;
70  typedef	long	dev_t;
71  typedef	long	off_t;
72*** /bsd4.3/usr/include/setjmp.h	Fri Feb  3 21:40:21 1989
73--- setjmp.h	Sun Feb 23 19:06:55 1992
74***************
75*** 24,30 ****
76--- 24,39 ----
77  #endif
78  
79  
80+ #ifdef __GNUC__
81  #ifdef _PROTOTYPES
82+ extern int sigsetjmp (sigjmp_buf env, int savemask);
83+ extern void siglongjmp (sigjmp_buf env, int val);
84+ #else
85+ extern int sigsetjmp();
86+ extern void siglongjmp();
87+ #endif /* _PROTOTYPES */
88+ #else /* not __GNUC__ */
89+ #ifdef _PROTOTYPES
90  extern int sigsetjmp(
91          sigjmp_buf env,
92          int savemask
93***************
94*** 37,43 ****
95  extern int sigsetjmp() #options(abnormal);
96  extern void siglongjmp() #options(noreturn);
97  #endif /* _PROTOTYPES */
98! 
99  #undef _PROTOTYPES
100  
101  #ifdef __cplusplus
102--- 46,52 ----
103  extern int sigsetjmp() #options(abnormal);
104  extern void siglongjmp() #options(noreturn);
105  #endif /* _PROTOTYPES */
106! #endif /* not __GNUC__ */
107  #undef _PROTOTYPES
108  
109  #ifdef __cplusplus
110EOP
111
112exit 0
113

README.C4X

1This file describes the implementation notes of the GNU C Compiler for
2the Texas Instruments Floating Point Digital Signal Processor
3families, TMS320C3x and TMS320C4x (including the C30, C31, C32, C40,
4and C44 chips).
5
6
7Currently, only two code variants are generated---those for the C3x
8and C4x architectures.  Note that the new operand combinations for
9parallel instructions, included in newer silicon revisions, are not
10yet supported.  These should be trivial to add for someone with the
11newer chips and the inclination.
12
13
14While the generated assembly code is fairly similar to that recognised
15by the TI assembler, there are a few differences (currently the machine
16option -mti, designed to enfore compatibility, is not fully
17implemented).  The major difference is the use of the ^ operator to
18load the 16 MSBs of an address or constant for the C4x.
19
20
21The generated assembly code requires the GNU assembler (GAS).  This is
22not currently included as part of the binutils package, due to the
23many hacks required to be compatible with TI's kludged COFF
24implementation, and the binutils not being designed for 32-bit bytes.
25Patches against binutils-2.7.2 can be obtained from
26http://www.elec.canterbury.ac.nz/c4x.  This site also has patches for
27the GNU debugger (GDB), incoporating a cycle accurate simulator that
28can display profiles and histories of code execution, detailing
29pipeline conflicts etc.
30
31
32GCC can be configured as a cross compiler for both the C3x and C4x
33architectures on the same system.  Use `configure --target=c4x' to
34configure GCC for both the C3x and C4x.  Then use the -m30 option to
35generate code for the C30 or -m40 (the default) for the C40.
36
37
38Further installation notes and other optimization patches for the C4x
39target can also be obtained from http://www.elec.canterbury.ac.nz/c4x.
40
41
42A Majordomo mailing list, gcc_c40@atlantek.com.au, exists to discuss
43related issues and suggestions for further optimizations.  To
44subscribe send a message with `subscribe gcc_c40' in the body to
45majordomo@atlantek.com.au.
46
47
48Michael Hayes,  26 Nov 98
49

README.DWARF

1Notes on the GNU Implementation of DWARF Debugging Information
2--------------------------------------------------------------
3Last Updated: Sun Jul 17 08:17:42 PDT 1994 by rfg@segfault.us.com
4------------------------------------------------------------
5
6This file describes special and unique aspects of the GNU implementation
7of the DWARF debugging information language, as provided in the GNU version
82.x compiler(s).
9
10For general information about the DWARF debugging information language,
11you should obtain the DWARF version 1 specification document (and perhaps
12also the DWARF version 2 draft specification document) developed by the
13UNIX International Programming Languages Special Interest Group.  A copy
14of the DWARF version 1 specification (in PostScript form) may be
15obtained either from me <rfg@netcom.com> or from the main Data General
16FTP server.  (See below.)  The file you are looking at now only describes
17known deviations from the DWARF version 1 specification, together with
18those things which are allowed by the DWARF version 1 specification but
19which are known to cause interoperability problems (e.g. with SVR4 SDB).
20
21To obtain a copy of the DWARF Version 1 and/or DWARF Version 2 specification
22from Data General's FTP server, use the following procedure:
23
24---------------------------------------------------------------------------
25	ftp to machine: "dg-rtp.dg.com" (128.222.1.2).  
26 
27	Log in as "ftp".
28	cd to "plsig"
29	get any of the following file you are interested in:
30 
31	dwarf.1.0.3.ps
32	dwarf.2.0.0.index.ps
33	dwarf.2.0.0.ps
34---------------------------------------------------------------------------
35
36The generation of DWARF debugging information by the GNU version 2.x C
37compiler has now been tested rather extensively for m88k, i386, i860, and
38Sparc targets.  The DWARF output of the GNU C compiler appears to inter-
39operate well with the standard SVR4 SDB debugger on these kinds of target
40systems (but of course, there are no guarantees).
41
42DWARF generation for the GNU g++ compiler is still not operable.  This is
43due primarily to the many remaining cases where the g++ front end does not
44conform to the conventions used in the GNU C front end for representing
45various kinds of declarations in the TREE data structure.  It is not clear
46at this time how these problems will be addressed.
47
48Future plans for the dwarfout.c module of the GNU compiler(s) includes the
49addition of full support for GNU FORTRAN.  (This should, in theory, be a
50lot simpler to add than adding support for g++... but we'll see.)
51
52Many features of the DWARF version 2 specification have been adapted to
53(and used in) the GNU implementation of DWARF (version 1).  In most of
54these cases, a DWARF version 2 approach is used in place of (or in addition
55to) DWARF version 1 stuff simply because it is apparent that DWARF version
561 is not sufficiently expressive to provide the kinds of information which
57may be necessary to support really robust debugging.  In all of these cases
58however, the use of DWARF version 2 features should not interfere in any
59way with the interoperability (of GNU compilers) with generally available
60"classic" (pre version 1) DWARF consumer tools (e.g. SVR4 SDB).
61
62The DWARF generation enhancement for the GNU compiler(s) was initially
63donated to the Free Software Foundation by Network Computing Devices.
64(Thanks NCD!) Additional development and maintenance of dwarfout.c has
65been largely supported (i.e. funded) by Intel Corporation.  (Thanks Intel!)
66
67If you have questions or comments about the DWARF generation feature, please
68send mail to me <rfg@netcom.com>.  I will be happy to investigate any bugs
69reported and I may even provide fixes (but of course, I can make no promises).
70
71The DWARF debugging information produced by GCC may deviate in a few minor
72(but perhaps significant) respects from the DWARF debugging information
73currently produced by other C compilers.  A serious attempt has been made
74however to conform to the published specifications, to existing practice,
75and to generally accepted norms in the GNU implementation of DWARF.
76
77    ** IMPORTANT NOTE **    ** IMPORTANT NOTE **    ** IMPORTANT NOTE **
78
79Under normal circumstances, the DWARF information generated by the GNU
80compilers (in an assembly language file) is essentially impossible for
81a human being to read.  This fact can make it very difficult to debug
82certain DWARF-related problems.  In order to overcome this difficulty,
83a feature has been added to dwarfout.c (enabled by the -fverbose-asm
84option) which causes additional comments to be placed into the assembly
85language output file, out to the right-hand side of most bits of DWARF
86material.  The comments indicate (far more clearly that the obscure
87DWARF hex codes do) what is actually being encoded in DWARF.  Thus, the
88-fverbose-asm option can be highly useful for those who must study the
89DWARF output from the GNU compilers in detail.
90
91---------
92
93(Footnote: Within this file, the term `Debugging Information Entry' will
94be abbreviated as `DIE'.)
95
96
97Release Notes  (aka known bugs)
98-------------------------------
99
100In one very obscure case involving dynamically sized arrays, the DWARF
101"location information" for such an array may make it appear that the
102array has been totally optimized out of existence, when in fact it
103*must* actually exist.  (This only happens when you are using *both* -g
104*and* -O.)  This is due to aggressive dead store elimination in the
105compiler, and to the fact that the DECL_RTL expressions associated with
106variables are not always updated to correctly reflect the effects of
107GCC's aggressive dead store elimination.
108
109-------------------------------
110
111When attempting to set a breakpoint at the "start" of a function compiled
112with -g1, the debugger currently has no way of knowing exactly where the
113end of the prologue code for the function is.  Thus, for most targets,
114all the debugger can do is to set the breakpoint at the AT_low_pc address
115for the function.  But if you stop there and then try to look at one or
116more of the formal parameter values, they may not have been "homed" yet,
117so you may get inaccurate answers (or perhaps even addressing errors).
118
119Some people may consider this simply a non-feature, but I consider it a
120bug, and I hope to provide some GNU-specific attributes (on function
121DIEs) which will specify the address of the end of the prologue and the
122address of the beginning of the epilogue in a future release.
123
124-------------------------------
125
126It is believed at this time that old bugs relating to the AT_bit_offset
127values for bit-fields have been fixed.
128
129There may still be some very obscure bugs relating to the DWARF description
130of type `long long' bit-fields for target machines (e.g. 80x86 machines)
131where the alignment of type `long long' data objects is different from
132(and less than) the size of a type `long long' data object.
133
134Please report any problems with the DWARF description of bit-fields as you
135would any other GCC bug.  (Procedures for bug reporting are given in the
136GNU C compiler manual.)
137
138--------------------------------
139
140At this time, GCC does not know how to handle the GNU C "nested functions"
141extension.  (See the GCC manual for more info on this extension to ANSI C.)
142
143--------------------------------
144
145The GNU compilers now represent inline functions (and inlined instances
146thereof) in exactly the manner described by the current DWARF version 2
147(draft) specification.  The version 1 specification for handling inline
148functions (and inlined instances) was known to be brain-damaged (by the
149PLSIG) when the version 1 spec was finalized, but it was simply too late
150in the cycle to get it removed before the version 1 spec was formally
151released to the public (by UI).
152
153--------------------------------
154
155At this time, GCC does not generate the kind of really precise information
156about the exact declared types of entities with signed integral types which
157is required by the current DWARF draft specification.
158
159Specifically, the current DWARF draft specification seems to require that
160the type of an non-unsigned integral bit-field member of a struct or union
161type be represented as either a "signed" type or as a "plain" type,
162depending upon the exact set of keywords that were used in the
163type specification for the given bit-field member.  It was felt (by the
164UI/PLSIG) that this distinction between "plain" and "signed" integral types
165could have some significance (in the case of bit-fields) because ANSI C
166does not constrain the signedness of a plain bit-field, whereas it does
167constrain the signedness of an explicitly "signed" bit-field.  For this
168reason, the current DWARF specification calls for compilers to produce
169type information (for *all* integral typed entities... not just bit-fields)
170which explicitly indicates the signedness of the relevant type to be
171"signed" or "plain" or "unsigned".
172
173Unfortunately, the GNU DWARF implementation is currently incapable of making
174such distinctions.
175
176--------------------------------
177
178
179Known Interoperability Problems
180-------------------------------
181
182Although the GNU implementation of DWARF conforms (for the most part) with
183the current UI/PLSIG DWARF version 1 specification (with many compatible
184version 2 features added in as "vendor specific extensions" just for good
185measure) there are a few known cases where GCC's DWARF output can cause
186some confusion for "classic" (pre version 1) DWARF consumers such as the
187System V Release 4 SDB debugger.  These cases are described in this section.
188
189--------------------------------
190
191The DWARF version 1 specification includes the fundamental type codes
192FT_ext_prec_float, FT_complex, FT_dbl_prec_complex, and FT_ext_prec_complex.
193Since GNU C is only a C compiler (and since C doesn't provide any "complex"
194data types) the only one of these fundamental type codes which GCC ever
195generates is FT_ext_prec_float.  This fundamental type code is generated
196by GCC for the `long double' data type.  Unfortunately, due to an apparent
197bug in the SVR4 SDB debugger, SDB can become very confused wherever any
198attempt is made to print a variable, parameter, or field whose type was
199given in terms of FT_ext_prec_float.
200
201(Actually, SVR4 SDB fails to understand *any* of the four fundamental type
202codes mentioned here.  This will fact will cause additional problems when
203there is a GNU FORTRAN front-end.)
204
205--------------------------------
206
207In general, it appears that SVR4 SDB is not able to effectively ignore
208fundamental type codes in the "implementation defined" range.  This can
209cause problems when a program being debugged uses the `long long' data
210type (or the signed or unsigned varieties thereof) because these types
211are not defined by ANSI C, and thus, GCC must use its own private fundamental
212type codes (from the implementation-defined range) to represent these types.
213
214--------------------------------
215
216
217General GNU DWARF extensions
218----------------------------
219
220In the current DWARF version 1 specification, no mechanism is specified by
221which accurate information about executable code from include files can be
222properly (and fully) described.  (The DWARF version 2 specification *does*
223specify such a mechanism, but it is about 10 times more complicated than
224it needs to be so I'm not terribly anxious to try to implement it right
225away.)
226
227In the GNU implementation of DWARF version 1, a fully downward-compatible
228extension has been implemented which permits the GNU compilers to specify
229which executable lines come from which files.  This extension places
230additional information (about source file names) in GNU-specific sections
231(which should be totally ignored by all non-GNU DWARF consumers) so that
232this extended information can be provided (to GNU DWARF consumers) in a way
233which is totally transparent (and invisible) to non-GNU DWARF consumers
234(e.g. the SVR4 SDB debugger).  The additional information is placed *only*
235in specialized GNU-specific sections, where it should never even be seen
236by non-GNU DWARF consumers.
237
238To understand this GNU DWARF extension, imagine that the sequence of entries
239in the .lines section is broken up into several subsections.  Each contiguous
240sequence of .line entries which relates to a sequence of lines (or statements)
241from one particular file (either a `base' file or an `include' file) could
242be called a `line entries chunk' (LEC).
243
244For each LEC there is one entry in the .debug_srcinfo section.
245
246Each normal entry in the .debug_srcinfo section consists of two 4-byte
247words of data as follows:
248
249	(1)	The starting address (relative to the entire .line section)
250		of the first .line entry in the relevant LEC.
251
252	(2)	The starting address (relative to the entire .debug_sfnames
253		section) of a NUL terminated string representing the
254		relevant filename.  (This filename name be either a
255		relative or an absolute filename, depending upon how the
256		given source file was located during compilation.)
257
258Obviously, each .debug_srcinfo entry allows you to find the relevant filename,
259and it also points you to the first .line entry that was generated as a result
260of having compiled a given source line from the given source file.
261
262Each subsequent .line entry should also be assumed to have been produced
263as a result of compiling yet more lines from the same file.  The end of
264any given LEC is easily found by looking at the first 4-byte pointer in
265the *next* .debug_srcinfo entry.  That next .debug_srcinfo entry points
266to a new and different LEC, so the preceding LEC (implicitly) must have
267ended with the last .line section entry which occurs at the 2 1/2 words
268just before the address given in the first pointer of the new .debug_srcinfo
269entry.
270
271The following picture may help to clarify this feature.  Let's assume that
272`LE' stands for `.line entry'.  Also, assume that `* 'stands for a pointer.
273
274
275	.line section	   .debug_srcinfo section     .debug_sfnames section
276	----------------------------------------------------------------
277
278	LE  <---------------------- *
279	LE			    * -----------------> "foobar.c" <---
280	LE								|
281	LE								|
282	LE  <---------------------- *					|
283	LE			    * -----------------> "foobar.h" <|	|
284	LE							     |	|
285	LE							     |	|
286	LE  <---------------------- *				     |	|
287	LE			    * ----------------->  "inner.h"  |	|
288	LE							     |	|
289	LE  <---------------------- *				     |	|
290	LE			    * -------------------------------	|
291	LE								|
292	LE								|
293	LE								|
294	LE								|
295	LE  <---------------------- *					|
296	LE			    * -----------------------------------
297	LE
298	LE
299	LE
300
301In effect, each entry in the .debug_srcinfo section points to *both* a
302filename (in the .debug_sfnames section) and to the start of a block of
303consecutive LEs (in the .line section).
304
305Note that just like in the .line section, there are specialized first and
306last entries in the .debug_srcinfo section for each object file.  These
307special first and last entries for the .debug_srcinfo section are very
308different from the normal .debug_srcinfo section entries.  They provide
309additional information which may be helpful to a debugger when it is
310interpreting the data in the .debug_srcinfo, .debug_sfnames, and .line
311sections.
312
313The first entry in the .debug_srcinfo section for each compilation unit
314consists of five 4-byte words of data.  The contents of these five words
315should be interpreted (by debuggers) as follows:
316
317	(1)	The starting address (relative to the entire .line section)
318		of the .line section for this compilation unit.
319
320	(2)	The starting address (relative to the entire .debug_sfnames
321		section) of the .debug_sfnames section for this compilation
322		unit.
323
324	(3)	The starting address (in the execution virtual address space)
325		of the .text section for this compilation unit.
326
327	(4)	The ending address plus one (in the execution virtual address
328		space) of the .text section for this compilation unit.
329
330	(5)	The date/time (in seconds since midnight 1/1/70) at which the
331		compilation of this compilation unit occurred.  This value
332		should be interpreted as an unsigned quantity because gcc
333		might be configured to generate a default value of 0xffffffff
334		in this field (in cases where it is desired to have object
335		files created at different times from identical source files
336		be byte-for-byte identical).  By default, these timestamps
337		are *not* generated by dwarfout.c (so that object files
338		compiled at different times will be byte-for-byte identical).
339		If you wish to enable this "timestamp" feature however, you
340		can simply place a #define for the symbol `DWARF_TIMESTAMPS'
341		in your target configuration file and then rebuild the GNU
342		compiler(s).
343
344Note that the first string placed into the .debug_sfnames section for each
345compilation unit is the name of the directory in which compilation occurred.
346This string ends with a `/' (to help indicate that it is the pathname of a
347directory).  Thus, the second word of each specialized initial .debug_srcinfo
348entry for each compilation unit may be used as a pointer to the (string)
349name of the compilation directory, and that string may in turn be used to
350"absolutize" any relative pathnames which may appear later on in the
351.debug_sfnames section entries for the same compilation unit.
352
353The fifth and last word of each specialized starting entry for a compilation
354unit in the .debug_srcinfo section may (depending upon your configuration)
355indicate the date/time of compilation, and this may be used (by a debugger)
356to determine if any of the source files which contributed code to this
357compilation unit are newer than the object code for the compilation unit
358itself.  If so, the debugger may wish to print an "out-of-date" warning
359about the compilation unit.
360
361The .debug_srcinfo section associated with each compilation will also have
362a specialized terminating entry.  This terminating .debug_srcinfo section
363entry will consist of the following two 4-byte words of data:
364
365	(1)	The offset, measured from the start of the .line section to
366		the beginning of the terminating entry for the .line section.
367
368	(2)	A word containing the value 0xffffffff.
369
370--------------------------------
371
372In the current DWARF version 1 specification, no mechanism is specified by
373which information about macro definitions and un-definitions may be provided
374to the DWARF consumer.
375
376The DWARF version 2 (draft) specification does specify such a mechanism.
377That specification was based on the GNU ("vendor specific extension")
378which provided some support for macro definitions and un-definitions,
379but the "official" DWARF version 2 (draft) specification mechanism for
380handling macros and the GNU implementation have diverged somewhat.  I
381plan to update the GNU implementation to conform to the "official"
382DWARF version 2 (draft) specification as soon as I get time to do that.
383
384Note that in the GNU implementation, additional information about macro
385definitions and un-definitions is *only* provided when the -g3 level of
386debug-info production is selected.  (The default level is -g2 and the
387plain old -g option is considered to be identical to -g2.)
388
389GCC records information about macro definitions and undefinitions primarily
390in a section called the .debug_macinfo section.  Normal entries in the
391.debug_macinfo section consist of the following three parts:
392
393	(1)	A special "type" byte.
394
395	(2)	A 3-byte line-number/filename-offset field.
396
397	(3)	A NUL terminated string.
398
399The interpretation of the second and third parts is dependent upon the
400value of the leading (type) byte.
401
402The type byte may have one of four values depending upon the type of the
403.debug_macinfo entry which follows.  The 1-byte MACINFO type codes presently
404used, and their meanings are as follows:
405
406	MACINFO_start		A base file or an include file starts here.
407	MACINFO_resume		The current base or include file ends here.
408	MACINFO_define          A #define directive occurs here.
409	MACINFO_undef           A #undef directive occur here.
410
411(Note that the MACINFO_... codes mentioned here are simply symbolic names
412for constants which are defined in the GNU dwarf.h file.)
413
414For MACINFO_define and MACINFO_undef entries, the second (3-byte) field
415contains the number of the source line (relative to the start of the current
416base source file or the current include files) when the #define or #undef
417directive appears.  For a MACINFO_define entry, the following string field
418contains the name of the macro which is defined, followed by its definition.
419Note that the definition is always separated from the name of the macro
420by at least one whitespace character.  For a MACINFO_undef entry, the
421string which follows the 3-byte line number field contains just the name
422of the macro which is being undef'ed.
423
424For a MACINFO_start entry, the 3-byte field following the type byte contains
425the offset, relative to the start of the .debug_sfnames section for the
426current compilation unit, of a string which names the new source file which
427is beginning its inclusion at this point.  Following that 3-byte field,
428each MACINFO_start entry always contains a zero length NUL terminated
429string.
430
431For a MACINFO_resume entry, the 3-byte field following the type byte contains
432the line number WITHIN THE INCLUDING FILE at which the inclusion of the
433current file (whose inclusion ends here) was initiated.  Following that
4343-byte field, each MACINFO_resume entry always contains a zero length NUL
435terminated string.
436
437Each set of .debug_macinfo entries for each compilation unit is terminated
438by a special .debug_macinfo entry consisting of a 4-byte zero value followed
439by a single NUL byte.
440
441--------------------------------
442
443In the current DWARF draft specification, no provision is made for providing
444a separate level of (limited) debugging information necessary to support
445tracebacks (only) through fully-debugged code (e.g. code in system libraries).
446
447A proposal to define such a level was submitted (by me) to the UI/PLSIG.
448This proposal was rejected by the UI/PLSIG for inclusion into the DWARF
449version 1 specification for two reasons.  First, it was felt (by the PLSIG)
450that the issues involved in supporting a "traceback only" subset of DWARF
451were not well understood.  Second, and perhaps more importantly, the PLSIG
452is already having enough trouble agreeing on what it means to be "conforming"
453to the DWARF specification, and it was felt that trying to specify multiple
454different *levels* of conformance would only complicate our discussions of
455this already divisive issue.  Nonetheless, the GNU implementation of DWARF
456provides an abbreviated "traceback only" level of debug-info production for
457use with fully-debugged "system library" code.  This level should only be
458used for fully debugged system library code, and even then, it should only
459be used where there is a very strong need to conserve disk space.  This
460abbreviated level of debug-info production can be used by specifying the
461-g1 option on the compilation command line.
462
463--------------------------------
464
465As mentioned above, the GNU implementation of DWARF currently uses the DWARF
466version 2 (draft) approach for inline functions (and inlined instances
467thereof).  This is used in preference to the version 1 approach because
468(quite simply) the version 1 approach is highly brain-damaged and probably
469unworkable.
470
471--------------------------------
472
473
474GNU DWARF Representation of GNU C Extensions to ANSI C
475------------------------------------------------------
476
477The file dwarfout.c has been designed and implemented so as to provide
478some reasonable DWARF representation for each and every declarative
479construct which is accepted by the GNU C compiler.  Since the GNU C
480compiler accepts a superset of ANSI C, this means that there are some
481cases in which the DWARF information produced by GCC must take some
482liberties in improvising DWARF representations for declarations which
483are only valid in (extended) GNU C.
484
485In particular, GNU C provides at least three significant extensions to
486ANSI C when it comes to declarations.  These are (1) inline functions,
487and (2) dynamic arrays, and (3) incomplete enum types.  (See the GCC
488manual for more information on these GNU extensions to ANSI C.)  When
489used, these GNU C extensions are represented (in the generated DWARF
490output of GCC) in the most natural and intuitively obvious ways.
491
492In the case of inline functions, the DWARF representation is exactly as
493called for in the DWARF version 2 (draft) specification for an identical
494function written in C++; i.e. we "reuse" the representation of inline
495functions which has been defined for C++ to support this GNU C extension.
496
497In the case of dynamic arrays, we use the most obvious representational
498mechanism available; i.e. an array type in which the upper bound of
499some dimension (usually the first and only dimension) is a variable
500rather than a constant.  (See the DWARF version 1 specification for more
501details.)
502
503In the case of incomplete enum types, such types are represented simply
504as TAG_enumeration_type DIEs which DO NOT contain either AT_byte_size
505attributes or AT_element_list attributes.
506
507--------------------------------
508
509
510Future Directions
511-----------------
512
513The codes, formats, and other paraphernalia necessary to provide proper
514support for symbolic debugging for the C++ language are still being worked
515on by the UI/PLSIG.  The vast majority of the additions to DWARF which will
516be needed to completely support C++ have already been hashed out and agreed
517upon, but a few small issues (e.g. anonymous unions, access declarations)
518are still being discussed.  Also, we in the PLSIG are still discussing
519whether or not we need to do anything special for C++ templates.  (At this
520time it is not yet clear whether we even need to do anything special for
521these.) 
522
523Unfortunately, as mentioned above, there are quite a few problems in the
524g++ front end itself, and these are currently responsible for severely
525restricting the progress which can be made on adding DWARF support
526specifically for the g++ front-end.  Furthermore, Richard Stallman has
527expressed the view that C++ friendships might not be important enough to
528describe (in DWARF).  This view directly conflicts with both the DWARF
529version 1 and version 2 (draft) specifications, so until this small
530misunderstanding is cleared up, DWARF support for g++ is unlikely.
531
532With regard to FORTRAN, the UI/PLSIG has defined what is believed to be a
533complete and sufficient set of codes and rules for adequately representing
534all of FORTRAN 77, and most of Fortran 90 in DWARF.  While some support for
535this has been implemented in dwarfout.c, further implementation and testing
536will have to await the arrival of the GNU Fortran front-end (which is
537currently in early alpha test as of this writing).
538
539GNU DWARF support for other languages (i.e. Pascal and Modula) is a moot
540issue until there are GNU front-ends for these other languages.
541
542GNU DWARF support for DWARF version 2 will probably not be attempted until
543such time as the version 2 specification is finalized.  (More work needs
544to be done on the version 2 specification to make the new "abbreviations"
545feature of version 2 more easily implementable.  Until then, it will be
546a royal pain the ass to implement version 2 "abbreviations".)  For the
547time being, version 2 features will be added (in a version 1 compatible
548manner) when and where these features seem necessary or extremely desirable.
549
550As currently defined, DWARF only describes a (binary) language which can
551be used to communicate symbolic debugging information from a compiler
552through an assembler and a linker, to a debugger.  There is no clear
553specification of what processing should be (or must be) done by the
554assembler and/or the linker.  Fortunately, the role of the assembler
555is easily inferred (by anyone knowledgeable about assemblers) just by
556looking  at examples of assembly-level DWARF code.  Sadly though, the
557allowable (or required) processing steps performed by a linker are
558harder to infer and (perhaps) even harder to agree upon.  There are
559several forms of very useful `post-processing' steps which intelligent
560linkers *could* (in theory) perform on object files containing DWARF,
561but any and all such link-time transformations are currently both disallowed
562and unspecified.
563
564In particular, possible link-time transformations of DWARF code which could
565provide significant benefits include (but are not limited to):
566
567	Commonization of duplicate DIEs obtained from multiple input
568	(object) files.
569
570	Cross-compilation type checking based upon DWARF type information
571	for objects and functions.
572
573	Other possible `compacting' transformations designed to save disk
574	space and to reduce linker & debugger I/O activity.
575

README.FRESCO

1Compiling Fresco with g++
2-----------------------------
3
4Fresco is an evolving interface and toolkit for object-oriented
5graphics.  A preliminary version (written in C++) was released
6with x11r6.
7
8Previous versions of Fresco have not compiled using g++,
9partly because of the use of true and false as identifiers.
10(They are now reserved words in g++, as required by the
11ANSI/ISO draft standard for C++.)
12
13If you get x11r6 with public patch #5 or a later version
14of Fresco, these problems should now be fixed.
15
16See http://www.faslab.com/fresco/HomePage.html for information
17on Fresco, including how to get the latest version.
18

README.gnat

1The following patches are needed in order to build GNAT with EGCS.
2
3These patches were tested with egcs-980308 and gnat-3.10p on a mips-sgi-irix6.3
4system.  The gnat build succeeded as per the instructions in the gnat
5README.BUILD file for building one library, except that CFLAGS="-O -g" and
6GNATLIBCFLAGS="-O -g" were substituted for the recommended "-O2" so that the
7build could be debugged.  There was no attempt to run the resulting build
8against any testsuite or validation suite.
9
10--
11
12Developers Notes:
13
14Every use of sizetype in the Ada front end should be checked to see if perhaps
15it should be using bitsizetype instead.  The change to maybe_pad_type is just
16a hack to work around this problem, and may not be desirable in the long term.
17
18There are many places in the Ada front end where it calls operand_equal_p to
19see if two type sizes are the same.  operand_equal_p fails if the two
20arguments have different TYPE_MODEs.  sizetype and bitsizetype can have
21different TYPE_MODEs.  Thus this code can fail if one type size is based
22on sizetype, and the other is based on bitsizetype.  The change to
23maybe_pad_type fixes one very critical place where this happens.  There may
24be others.
25
26--
27
28Mon Mar 16 11:00:25 1998  Jim Wilson  <wilson@cygnus.com>
29
30	* a-gtran3.c (maybe_pad_type): Convert both size and orig_size to
31	sizetype if they have differing modes.
32	* a-misc.c (gnat_tree_code_type): Change from string to char array.
33	(init_lex): Delete realloc calls for tree_code_* globals.  Adjust
34	bcopy call for gnat_tree_code_type change.
35	* a-tree.def: Adjust for tree_code_* type changes.
36
37	* a-misc.c (init_lex): Rename to init_parse.
38
39diff -c ada/a-gtran3.c /home/brolley/comp/egcs/tmp/ada/a-gtran3.c
40*** ada/a-gtran3.c	Mon Mar 30 16:29:04 1998
41--- /home/brolley/comp/egcs/tmp/ada/a-gtran3.c	Thu Apr  2 17:16:15 1998
42***************
43*** 3329,3334 ****
44--- 3329,3341 ----
45       isn't changing.  Likewise, clear the alignment if it isn't being
46       changed.  Then return if we aren't doing anything.  */
47  
48+     if (size != 0
49+ 	&& TYPE_MODE (TREE_TYPE (size)) != TYPE_MODE (TREE_TYPE (orig_size)))
50+       {
51+ 	size = convert (sizetype, size);
52+ 	orig_size = convert (sizetype, orig_size);
53+       }
54+  
55    if (size != 0
56        && (operand_equal_p (size, orig_size, 0)
57  	  || (TREE_CODE (orig_size) == INTEGER_CST
58diff -c ada/a-misc.c /home/brolley/comp/egcs/tmp/ada/a-misc.c
59*** ada/a-misc.c	Mon Mar 30 16:29:05 1998
60--- /home/brolley/comp/egcs/tmp/ada/a-misc.c	Thu Apr  2 17:36:19 1998
61***************
62*** 70,77 ****
63  
64  #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
65  
66! char *gnat_tree_code_type[] = {
67!   "x",
68  #include "a-tree.def"
69  };
70  #undef DEFTREECODE
71--- 70,77 ----
72  
73  #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
74  
75! char gnat_tree_code_type[] = {
76!   'x',
77  #include "a-tree.def"
78  };
79  #undef DEFTREECODE
80***************
81*** 254,259 ****
82--- 254,268 ----
83  print_lang_statistics ()
84  {}
85  
86+ void
87+ lang_print_xnode (file, node, indent)
88+      FILE *file;
89+      tree node;
90+      int indent;
91+ {
92+ }
93+  
94+ 
95  /* integrate_decl_tree calls this function, but since we don't use the
96     DECL_LANG_SPECIFIC field, this is a no-op.  */
97  
98***************
99*** 603,622 ****
100     it, but it's where g++ does it.  */
101  
102  void
103! init_lex ()
104  {
105    lang_expand_expr = gnat_expand_expr;
106  
107-   tree_code_type
108-     = (char **) realloc (tree_code_type,
109- 			 sizeof (char *) * LAST_GNAT_TREE_CODE);
110-   tree_code_length
111-     = (int *) realloc (tree_code_length,
112- 		       sizeof (int) * LAST_GNAT_TREE_CODE);
113-   tree_code_name
114-     = (char **) realloc (tree_code_name,
115- 			 sizeof (char *) * LAST_GNAT_TREE_CODE);
116- 
117    bcopy ((char *) gnat_tree_code_type,
118  	 (char *) (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE),
119  	 ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
120--- 612,622 ----
121     it, but it's where g++ does it.  */
122  
123  void
124! init_parse (filename)
125!      char *filename;
126  {
127    lang_expand_expr = gnat_expand_expr;
128  
129    bcopy ((char *) gnat_tree_code_type,
130  	 (char *) (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE),
131  	 ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
132***************
133*** 629,636 ****
134  
135    bcopy ((char *) gnat_tree_code_name,
136  	 (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
137! 	 ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
138! 	  * sizeof (char *)));
139  }
140  
141  /* Sets some debug flags for the parsed. It does nothing here.  */
142--- 629,640 ----
143  
144    bcopy ((char *) gnat_tree_code_name,
145  	 (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
146! 	 LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE);
147! }
148! 
149! void
150! finish_parse ()
151! {
152  }
153  
154  /* Sets some debug flags for the parsed. It does nothing here.  */
155diff -c ada/a-tree.def /home/brolley/comp/egcs/tmp/ada/a-tree.def
156*** ada/a-tree.def	Mon Mar 30 16:29:09 1998
157--- /home/brolley/comp/egcs/tmp/ada/a-tree.def	Thu Apr  2 17:20:38 1998
158***************
159*** 31,69 ****
160     The only field used if TREE_COMPLEXITY, which contains the GNAT node
161     number.  */
162  
163! DEFTREECODE (TRANSFORM_EXPR, "transform_expr", "e", 0)
164  
165  /* Perform an unchecked conversion between the input and the output. 
166     if TREE_ADDRESSABLE is set, it means this is in an LHS; in that case,
167     we can only use techniques, such as pointer punning, that leave the
168     expression a "name".  */
169  
170! DEFTREECODE (UNCHECKED_CONVERT_EXPR, "unchecked_convert_expr", "1", 1)
171  
172  /* A type that is an unconstrained array itself.  This node is never passed
173     to GCC. TREE_TYPE is the type of the fat pointer and TYPE_OBJECT_RECORD_TYPE
174     is the type of a record containing the template and data.  */
175  
176! DEFTREECODE (UNCONSTRAINED_ARRAY_TYPE, "unconstrained_array_type", "t", 0)
177  
178  /* A reference to an unconstrained array.  This node only exists as an
179     intermediate node during the translation of a GNAT tree to a GCC tree;
180     it is never passed to GCC.  The only field used is operand 0, which
181     is the fat pointer object.  */
182  
183! DEFTREECODE (UNCONSTRAINED_ARRAY_REF, "unconstrained_array_ref", "r", 1)
184  
185  /* An expression that returns an RTL suitable for its type.  Operand 0
186     is an expression to be evaluated for side effects only.  */
187  
188! DEFTREECODE (NULL_EXPR, "null_expr", "e", 1)
189  
190  /* An expression that emits a USE for its single operand.  */
191  
192! DEFTREECODE (USE_EXPR, "use_expr", "e", 1)
193  
194  /* An expression that is treated as a conversion while generating code, but is
195     used to prevent infinite recursion when conversions of biased types are
196     involved.  */
197  
198! DEFTREECODE (GNAT_NOP_EXPR, "gnat_nop_expr", "1", 1)
199--- 31,69 ----
200     The only field used if TREE_COMPLEXITY, which contains the GNAT node
201     number.  */
202  
203! DEFTREECODE (TRANSFORM_EXPR, "transform_expr", 'e', 0)
204  
205  /* Perform an unchecked conversion between the input and the output. 
206     if TREE_ADDRESSABLE is set, it means this is in an LHS; in that case,
207     we can only use techniques, such as pointer punning, that leave the
208     expression a "name".  */
209  
210! DEFTREECODE (UNCHECKED_CONVERT_EXPR, "unchecked_convert_expr", '1', 1)
211  
212  /* A type that is an unconstrained array itself.  This node is never passed
213     to GCC. TREE_TYPE is the type of the fat pointer and TYPE_OBJECT_RECORD_TYPE
214     is the type of a record containing the template and data.  */
215  
216! DEFTREECODE (UNCONSTRAINED_ARRAY_TYPE, "unconstrained_array_type", 't', 0)
217  
218  /* A reference to an unconstrained array.  This node only exists as an
219     intermediate node during the translation of a GNAT tree to a GCC tree;
220     it is never passed to GCC.  The only field used is operand 0, which
221     is the fat pointer object.  */
222  
223! DEFTREECODE (UNCONSTRAINED_ARRAY_REF, "unconstrained_array_ref", 'r', 1)
224  
225  /* An expression that returns an RTL suitable for its type.  Operand 0
226     is an expression to be evaluated for side effects only.  */
227  
228! DEFTREECODE (NULL_EXPR, "null_expr", 'e', 1)
229  
230  /* An expression that emits a USE for its single operand.  */
231  
232! DEFTREECODE (USE_EXPR, "use_expr", 'e', 1)
233  
234  /* An expression that is treated as a conversion while generating code, but is
235     used to prevent infinite recursion when conversions of biased types are
236     involved.  */
237  
238! DEFTREECODE (GNAT_NOP_EXPR, "gnat_nop_expr", '1', 1)
239
240
241This patch from Fred Fish to GNAT may make building simpler.  We haven't
242tested it.
243
244> I put a very short blurb in the faq.  GNAT is complicated enough that
245> we should probably write a whole page on how to build/install it.
246
247You may want to use some or all of these patches:
248
249	* Make-lang.in (gnattools): Depends upon GCC_PARTS.
250	(ada.start.encap): Depends upon gnattools.
251	(ada.rest.encap): Depends upon gnatlib.
252	* Makefile.in (../stamp-gnatlib1): Since we are still in the rts
253	subdir when the rule runs, we need to touch ../../stamp-gnatlib1.
254	(../stamp-gnatlib1): Don't unconditionally remove the rts directory,
255	create it if one does not exist.
256	(gnatlib): Remove superflous leading blank char at *-*-pe line.
257	* a-init.c: Define NULL if not yet defined.
258
259Index: Make-lang.in
260===================================================================
261RCS file: /cvsroot/gg/egcs/gcc/ada/Make-lang.in,v
262retrieving revision 1.1.1.1
263retrieving revision 1.3
264diff -c -r1.1.1.1 -r1.3
265*** Make-lang.in	1997/10/17 06:19:09	1.1.1.1
266--- Make-lang.in	1998/03/17 14:26:14	1.3
267***************
268*** 100,106 ****
269  
270  # use host-gcc
271  # getopt*.o has to be built before CC=../xgcc
272! gnattools: getopt.o getopt1.o force
273  	$(MAKE) $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS)\
274  	   CC="../xgcc -B../" GNATBIND="../gnatbind" \
275  	   gnatf gnatlink gnatkr gnatmake gnatcmd gnatprep \
276--- 100,107 ----
277  
278  # use host-gcc
279  # getopt*.o has to be built before CC=../xgcc
280! # GCC_PARTS has to be built before CC=../xgcc
281! gnattools: getopt.o getopt1.o $(GCC_PARTS) force
282  	$(MAKE) $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS)\
283  	   CC="../xgcc -B../" GNATBIND="../gnatbind" \
284  	   gnatf gnatlink gnatkr gnatmake gnatcmd gnatprep \
285***************
286*** 163,170 ****
287  	-if [ -f gnatls$(exeext) ] ; then\
288  	  mv gnatls$(exeext)    gnatls-cross$(exeext); fi
289  
290! ada.start.encap:
291! ada.rest.encap:
292  ada.info:
293  ada.dvi:
294  
295--- 164,171 ----
296  	-if [ -f gnatls$(exeext) ] ; then\
297  	  mv gnatls$(exeext)    gnatls-cross$(exeext); fi
298  
299! ada.start.encap: gnattools
300! ada.rest.encap: gnatlib
301  ada.info:
302  ada.dvi:
303  
304Index: Makefile.in
305===================================================================
306RCS file: /cvsroot/gg/egcs/gcc/ada/Makefile.in,v
307retrieving revision 1.1.1.1
308retrieving revision 1.5
309diff -c -r1.1.1.1 -r1.5
310*** Makefile.in	1997/10/17 06:19:09	1.1.1.1
311--- Makefile.in	1998/02/19 14:16:34	1.5
312***************
313*** 798,806 ****
314     #  3. copy 3xyyy.ad[sb] -->-- i-yyy.ad[sb] 
315  
316  ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
317! 	rm -rf rts
318! 	mkdir rts
319! 	chmod u+w rts
320  	(\
321  	   case $(target) in \
322  		sparc-sun-sunos4*) 	letter=u ;;\
323--- 800,806 ----
324     #  3. copy 3xyyy.ad[sb] -->-- i-yyy.ad[sb] 
325  
326  ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
327! 	if [ -d rts ]; then true; else mkdir rts; chmod u+w rts; fi
328  	(\
329  	   case $(target) in \
330  		sparc-sun-sunos4*) 	letter=u ;;\
331***************
332*** 888,894 ****
333  		   done;; \
334  	   esac ; \
335  	   rm -f ../stamp-gnatlib ;  \
336! 	   touch ../stamp-gnatlib1)
337  
338  gnatlib-common: ../stamp-gnatlib1
339  	(subdir=`cd $(srcdir); pwd`; \
340--- 888,894 ----
341  		   done;; \
342  	   esac ; \
343  	   rm -f ../stamp-gnatlib ;  \
344! 	   touch ../../stamp-gnatlib1)
345  
346  gnatlib-common: ../stamp-gnatlib1
347  	(subdir=`cd $(srcdir); pwd`; \
348***************
349*** 923,929 ****
350  		mips-sni-*	       |\
351  		*-*-cygwin32*          |\
352  		*-*-mingw32*           |\
353!  		*-*-pe                 |\
354                  *)		       \
355                  \
356  		 $(MAKE)  CC="../../xgcc -B../../" \
357--- 923,929 ----
358  		mips-sni-*	       |\
359  		*-*-cygwin32*          |\
360  		*-*-mingw32*           |\
361! 		*-*-pe                 |\
362                  *)		       \
363                  \
364  		 $(MAKE)  CC="../../xgcc -B../../" \
365Index: a-init.c
366===================================================================
367RCS file: /cvsroot/gg/egcs/gcc/ada/a-init.c,v
368retrieving revision 1.1.1.1
369retrieving revision 1.2
370diff -c -r1.1.1.1 -r1.2
371*** a-init.c	1997/10/17 06:19:10	1.1.1.1
372--- a-init.c	1998/01/04 23:11:42	1.2
373***************
374*** 516,521 ****
375--- 516,525 ----
376    __gnat_raise (exception);
377  }
378  
379+ #ifndef NULL
380+ #define NULL 0
381+ #endif
382+ 
383  static void
384  __gnat_install_handler ()
385  {
386
387Wed Jun 24 15:06:09 1998  Dave Brolley  <brolley@cygnus.com>
388
389	* a-misc.c (lang_decode_option): New interface.
390	* a-misc.h (lang_decode_option): New interface.
391
392*** /home/brolley/tmp/a-misc.c	Wed Jun 24 15:01:22 1998
393--- ada/a-misc.c	Wed Jun 24 15:02:42 1998
394*************** init_gnat_args ()
395*** 162,170 ****
396     it returns 0. */
397  
398  int
399! lang_decode_option (p)
400!      char *p;
401  {
402    extern int  save_argc;
403    extern char **save_argv;
404  
405--- 162,172 ----
406     it returns 0. */
407  
408  int
409! lang_decode_option (argc, argv)
410!      int argc;
411!      char **argv;
412  {
413+   char *p = argv[0];
414    extern int  save_argc;
415    extern char **save_argv;
416  
417*** /home/brolley/tmp/a-misc.h	Wed Jun 24 15:01:22 1998
418--- ada/a-misc.h	Wed Jun 24 15:03:20 1998
419*************** enum gnat_tree_code {
420*** 63,69 ****
421     option decoding phase of GCC calls this routine on the flags that it cannot
422     decode. This routine returns 1 if it is successful, otherwise it
423     returns 0. */
424! extern int lang_decode_option	PROTO((char *));
425  
426  /* Perform all the initialization steps that are language-specific.  */
427  extern void lang_init		PROTO((void));
428--- 63,69 ----
429     option decoding phase of GCC calls this routine on the flags that it cannot
430     decode. This routine returns 1 if it is successful, otherwise it
431     returns 0. */
432! extern int lang_decode_option	PROTO((int, char **));
433  
434  /* Perform all the initialization steps that are language-specific.  */
435  extern void lang_init		PROTO((void));
436

README.NS32K

1This file describes the implementation notes of the GNU C Compiler for
2the National Semiconductor 32032 chip (and 32000 family).
3
4Much of this file was obsolete. It described restrictions caused by
5bugs in early versions of of the ns32032 chip and by bugs in sequent
6assemblers and linkers of the time.
7
8Many (all?) of the chip bugs were fixed in later revisions and
9certainly fixed by later chips in the same series (ns32332 and
10ns32532).
11
12Conditional code to support sequent assembler and/or linker restrictions
13has not been removed deliberately, but has probably not been tested in
14a *very* long time.
15
16Support for one sequent assembler bug has *not* been retained.
17It was necessary to say:
18
19	addr _x,rn
20	cmpd _p,rn
21
22rather than:
23
24	cmpd _p,@_x
25
26
27This used to be forced by the use of "rmn" register constraints rather
28than "g". This is bad for other platforms which do not have this
29restraint.
30
31It is likely that there are no Balance 8000's still in operation, but
32if there are and the assembler bug was never fixed then the easiest
33way to run gcc would be to also run gas.
34
35The code required by the sequent assembler is still generated when the
36-fpic flag is in effect and this is forced by the appropriate
37definition of LEGITIMATE_PIC_OPERAND_P. If support for the old sequent
38assembler bug is required, then this could be achieved by adding the
39test from LEGITIMATE_PIC_OPERAND to the GO_IF_LEGITIMATE_ADDRESS
40definition. Of course, this should be conditional on something in the
41sequent.h config file.
42
43The original contents of this file appear below as an historical note.
44SEQUENT_ADDRESS_BUG mentioned below has been replaced by
45INDEX_RATHER_THAN_BASE. Note that merlin.h still defines
46SEQUENT_ADDRESS_BUG even though it is not used anywhere. Since it has
47been like this for a long time, presumably either the
48SEQUENT_ADDRESS_BUG is not required for the merlin, or no one is using
49gcc on the merlin anymore.
50
51HISTORICAL NOTE
52
53The 32032 machine description and configuration file for this compiler
54is, for NS32000 family machine, primarily machine independent.
55However, since this release still depends on vendor-supplied
56assemblers and linkers, the compiler must obey the existing
57conventions of the actual machine to which this compiler is targeted.
58In this case, the actual machine which this compiler was targeted to
59is a Sequent Balance 8000, running DYNIX 2.1.
60
61The assembler for DYNIX 2.1 (and DYNIX 3.0, alas) does not cope with
62the full generality of the addressing mode REGISTER RELATIVE.
63Specifically, it generates incorrect code for operands of the
64following form:
65
66	sym(rn)
67
68Where `rn' is one of the general registers.  Correct code is generated
69for operands of the form
70
71	sym(pn)
72
73where `pn' is one of the special processor registers (sb, fp, or sp).
74
75An equivalent operand can be generated by the form
76
77	sym[rn:b]
78
79although this addressing mode is about twice as slow on the 32032.
80
81The more efficient addressing mode is controlled by defining the
82constant SEQUENT_ADDRESS_BUG to 0.  It is currently defined to be 1.
83
84Another bug in the assembler makes it impossible to compute with
85explicit addresses.  In order to compute with a symbolic address, it
86is necessary to load that address into a register using the "addr"
87instruction.  For example, it is not possible to say
88
89	cmpd _p,@_x
90
91Rather one must say
92
93	addr _x,rn
94	cmpd _p,rn
95
96
97The ns32032 chip has a number of known bugs.  Any attempt to make the
98compiler unaware of these deficiencies will surely bring disaster.
99The current list of know bugs are as follows (list provided by Richard
100Stallman):
101
1021) instructions with two overlapping operands in memory
103(unlikely in C code, perhaps impossible).
104
1052) floating point conversion instructions with constant
106operands (these may never happen, but I'm not certain).
107
1083) operands crossing a page boundary.  These can be prevented
109by setting the flag in tm.h that requires strict alignment.
110
1114) Scaled indexing in an insn following an insn that has a read-write
112operand in memory.  This can be prevented by placing a no-op in
113between.  I, Michael Tiemann, do not understand what exactly is meant
114by `read-write operand in memory'.  If this is referring to the special
115TOS mode, for example "addd 5,tos" then one need not fear, since this
116will never be generated.  However, is this includes "addd 5,-4(fp)"
117then there is room for disaster.  The Sequent compiler does not insert
118a no-op for code involving the latter, and I have been informed that
119Sequent is aware of this list of bugs, so I must assume that it is not
120a problem.
121
1225) The 32032 cannot shift by 32 bits.  It shifts modulo the word size
123of the operand.  Therefore, for 32-bit operations, 32-bit shifts are
124interpreted as zero bit shifts.  32-bit shifts have been removed from
125the compiler, but future hackers must be careful not to reintroduce
126them.
127
1286) The ns32032 is a very slow chip; however, some instructions are
129still very much slower than one might expect.  For example, it is
130almost always faster to double a quantity by adding it to itself than
131by shifting it by one, even if that quantity is deep in memory.  The
132MOVM instruction has a 20-cycle setup time, after which it moves data
133at about the speed that normal moves would.  It is also faster to use
134address generation instructions than shift instructions for left
135shifts less than 4.  I do not claim that I generate optimal code for all
136given patterns, but where I did escape from National's "clean
137architecture", I did so because the timing specification from the data
138book says that I will win if I do.  I suppose this is called the
139"performance gap".
140
141
142Signed bitfield extraction has not been implemented.  It is not
143provided by the NS32032, and while it is most certainly possible to do
144better than the standard shift-left/shift-right sequence, it is also
145quite hairy.  Also, since signed bitfields do not yet exist in C, this
146omission seems relatively harmless.
147
148
149Zero extractions could be better implemented if it were possible in
150GCC to provide sized zero extractions: i.e. a byte zero extraction
151would be allowed to yield a byte result.  The current implementation
152of GCC manifests 68000-ist thinking, where bitfields are extracted
153into a register, and automatically sign/zero extended to fill the
154register.  See comments in ns32k.md around the "extzv" insn for more
155details.
156
157
158It should be noted that while the NS32000 family was designed to
159provide odd-aligned addressing capability for multi-byte data (also
160provided by the 68020, but not by the 68000 or 68010), many machines
161do not opt to take advantage of this.  For example, on the sequent,
162although there is no advantage to long-word aligning word data, shorts
163must be int-aligned in structs.  This is an example of another
164machine-specific machine dependency.
165
166
167Because the ns32032 is has a coherent byte-order/bit-order
168architecture, many instructions which would be different for
16968000-style machines, fold into the same instruction for the 32032.
170The classic case is push effective address, where it does not matter
171whether one is pushing a long, word, or byte address.  They all will
172push the same address.
173
174
175The macro FUNCTION_VALUE_REGNO_P is probably not sufficient, what is
176needed is FUNCTION_VALUE_P, which also takes a MODE parameter.  In
177this way it will be possible to determine more exactly whether a
178register is really a function value register, or just one that happens
179to look right.
180

README.RS6000

1			AIX 4.3 archive libraries
2
3AIX 4.3 utilizes a new "large format" archive to support both 32-bit and
464-bit object modules.  The routines provided in AIX 4.3.0 and AIX 4.3.1
5to parse archive libraries did not handle the new format correctly.  These
6routines are used by GCC and result in error messages during linking such
7as "not a COFF file".  The version of the routines shipped with AIX 4.3.1
8should work for a 32-bit environment.  The "-g" option of the archive
9command may be used to create archives of 32-bit objects using the
10original "small format".  A correct version of the routines is shipped
11with AIX 4.3.2.
12
13
14			     AIX 4.3.2 binder
15
16The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
17with a segmentation fault when invoked by any version of GCC.  A fix for
18APAR IX87327 will be available from IBM Customer Support.
19
20
21			   AIX 4.3.0 assembler
22
23The AIX 4.3.0.0 assembler generates incorrect object files if the ".bs"
24pseudo-op references symbols in certain sections.  If GCC is invoked with
25the -g debugging option (including during bootstrapping), incorrect object
26files will be produced and the AIX linker will fail with a severe error.
27A fix for APAR IX74254 (64BIT DISASSEMBLED OUPUT FROM COMPILER FAILS TO
28ASSEMBLE/BIND) is available from IBM Customer Support and from its
29service.boulder.ibm.com website as PTF U453956.
30
31
32			      AIX 4.1 binder
33
34Some versions of the AIX binder (linker) can fail with a relocation
35overflow severe error when the -bbigtoc option is used to link
36GCC-produced object files into an executable that overflows the TOC.
37Linking f771, the GNU Fortran backend, will fail in this manner.  A fix
38for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
39available from IBM Customer Support and from its website as PTF U455193.
40
41Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
42the link step now may produce warnings of duplicate symbols which were not
43reported before.  The assembly files generated by GCC for AIX always have
44included multiple symbol definitions for certain global variable and
45function declarations in the original program.  The warnings should not
46prevent the linker from producing a correct library or runnable executable.
47
48
49			     AIX NLS problems
50
51AIX on the RS/6000 provides support (NLS) for environments outside of
52the United States.  Compilers and assemblers use NLS to support
53locale-specific representations of various objects including
54floating-point numbers ("." vs "," for separating decimal fractions).
55There have been problems reported where the library linked with GCC does
56not produce the same floating-point formats that the assembler accepts.
57If you have this problem, set the LANG environment variable to "C" or
58"En_US".
59
60				     
61			 AIX 3.2.5 XLC-1.3 problems
62
63XLC version 1.3.0.0 distributed with AIX 3.2.5 will miscompile jump.c when
64building the stage1 compiler during the bootstrap process.  This will cause
65GCC to crash and the bootstrap to fail later while compiling libgcc2.c.  XLC
66version 1.3.0.1 or later fixes this problem.  XLC-1.3.0.19 also cannot
67bootstrap GCC so please avoid that release as well.  You can obtain
68XLC-1.3.0.24 by requesting PTF 432238 from IBM, or just ask for the latest
69release of XLC-1.3.
70
71There also have been reports of problems bootstrapping GCC with some older
72releases of xlc-1.2.1, including xlc-1.2.1.8.  Newer releases of xlc-1.2.1
73do not exhibit this problem: xlc-1.2.1.28 is known to bootstrap properly.
74
75
76		       AIX 3.2 common-mode support
77
78AIX common-mode providing transparent support of both the POWER and PowerPC
79architectures is usable in AIX 3.2.3 and above but an export file and
80support for hidden export via libc.a will not exist until AIX 4.1.  libgcc.a
81also must be compiled in common-mode.  Note that executables generated for
82the POWER (RIOS1 and RSC) architecture will run directly on systems using
83the MPC601 chip.  Common-mode only improves the performance of a single
84executable run on both POWER and PowerPC architecture platforms by not using
85POWER- or PowerPC-specific instructions and eliminating the need to trap to
86emulation (for POWER instructions run on PowerPC).
87
88To link a common-mode application prior to AIX 4.1 and run it on a system at
89AIX level 3.2.3 or above, use the text between the "<>" as an export file
90(e.g. milli.exp)
91
92<><><><><><><><><><><>
93#!
94__mulh          0x3100
95__mull          0x3180
96__divss         0x3200
97__divus         0x3280
98__quoss         0x3300
99__quous         0x3380
100<><><><><><><><><><><>
101
102and then link with -Wl,-bI:milli.exp.
103
104
105		     AIX 3.1 and 3.2 assembler problems
106
107Specifying the -g flag to GCC on the RS/6000 requires upgrading the
108standard AIX assembler distributed with AIX 3.1 and versions of AIX
1093.2 earlier than 3.2.4 with a replacement that is available from IBM.
110Note that Makefile.in specifies the -g when compiling libgcc2.c.
111
112You can test for the presence of a fixed assembler by entering the following:
113		% as -u < /dev/null
114If the command exits normally, the assembler fix already is installed.
115If the assembler complains that "-u" is an unknown flag, you need to order
116the fix.
117
118If you are running AIX 3.1 (lslpp -h bos.obj output reports
11903.01.0005.XXXX where the 0005 can be any higher number and the XXXX
120can be any value), call IBM Support at 800-237-5511 and ask for
121shipment of AIX/6000 fix PTF U403044 for APAR IX22829 (.extern foo
122conflicts with defining foo).
123
124If you are running AIX 3.2 but not 3.2.4 or later (lslpp -h bos.obj
125output reports 03.02.0000.0000), a newer update to the assembler fix
126is available.  Ask for shipment of AIX/6000 fix PTF U416277 for
127IX32992 (.global prevents detection of duplicate symbol).
128
129If you are running AIX 3.2.4 or later, you already have the new
130assembler.
131
132Any customer can order and get the replacement assembler, and install it on
133one or more machines.  It is available on diskette from IBM Customer Support
134and from its website.
135
136If you contact IBM Customer Support, they may also ask you for your customer
137number.  If you do not know it, you will still be able to get the fix, but
138you will have to be persistent.  IBM has corresponding support organizations
139outside of North America.  Call your IBM branch office and ask them to put
140you in touch with the department that handles fixes for AIX/6000.  If that
141doesn't work, ask for the department that handles software defect support
142for AIX/6000 and ask for the APAR fix.
143
144If you use the GNU assembler instead of the system supplied assembler, you need
145an assembler modified after October 16th, 1995 in order to build the GNU C
146compiler.  This is because the GNU C compiler wants to build a variant of its
147library, libgcc.a with the -mcpu=common switch to support building programs
148that can run on either the Power or PowerPC machines.
149

README.TRAD

1This is a partial list of how `gcc -traditional' disagrees with
2traditional C compilers (perhaps only some of them).  Most of these
3differences are not bugs.
4
5---------------------------------------------------------------------------
6K&R-1 (2.4.3) says:
7
8	"If the character following a backslash is not one of those
9	specified {in the table above}, the backslash is ignored."
10
11Up until recently, `gcc -traditional' complained about \x \a and \v
12appearing in a character or string literal.  I believe however that
13this non-feature has been eliminated (recently).
14
15---------------------------------------------------------------------------
16When in -traditional mode, gcc allows the following erroneous pair of
17declarations to appear together in a given scope:
18
19	typedef int foo;
20	typedef foo foo;
21
22---------------------------------------------------------------------------
23K&R-1 (8.5) says:
24
25	"No field may be wider than a word."
26
27Gcc however allows:
28
29	struct S { int i:33; };
30
31---------------------------------------------------------------------------
32In K&R-1 there is no restriction against comments crossing include file
33boundaries.  Gcc however doesn't allow this, even when in -traditional mode.
34
35---------------------------------------------------------------------------
36Regarding the length of identifiers, K&R-1 (2.2) says:
37
38	"No more than the first eight characters are significant,
39	although more may be used."
40
41Gcc treats all characters of identifiers as significant, even when in
42-traditional mode.
43
44---------------------------------------------------------------------------
45K&R-1 (2.2) says:
46
47	"An identifier is a sequence of letters and digits; the first
48	character must be a letter.  The underscore _ counts as a letter."
49
50Gcc also allows dollar signs in identifiers.  (This may also be an issue
51for the -pedantic option.)
52
53---------------------------------------------------------------------------
54
55
56

README.X11

1[This file contains two alternative recipes for compiling X11 with GCC.
2The first alternative puts libgcc.a into the shared X library; the second
3does not.  Neither alternative works on all kinds of systems.
4It may be that when using GCC 2.4, both alternatives work okay on 
5relatively recent Sparc systems.  The first alternative is likely
6not to work on a Sun 3 without hardware floating point.]
7
8How to compile X11R5 (patch level 11) with GCC version 2:
9
10The patches include support for building the shared libraries with GCC
112 on the Sparc and 68k machines.  This version includes the necessary
12parts of libgcc.a in the shared library for X, in case functions in
13that library need it.  Thus the default behavior is now to build
14everything, including the libraries, with gcc.
15
16If you build the shared library this way, it may not work with 
17executables made with older versions of GCC (2.3.3 and earlier).
18If that happens, relink those executables with the latest GCC.
19IF YOU THINK YOU MIGHT COMPILE X FOR SOLARIS 2, then you really don't
20need this patch: get /contrib/R5.SunOS5.patch.tar.Z from
21export.lcs.mit.edu instead.  It has everything you need to do the
22build for Solaris 2, sets you up to everything with GCC, and is
23backward compatible with SunOS 4.*.  Get the README
24(/contrib/R5.SunOS5.patch.README at export) for more info.
25
26If you see undefined symbols _dlopen, _dlsym, or _dlclose when linking
27with -lX11, compile and link against the file mit/util/misc/dlsym.c in
28the MIT X11R5 distribution.  Alternatively, do dynamic linking
29by using a non-GNU ld.
30
31mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2.
32If -fstrength-reduce (or any other -f option) is a major win, then it
33will most likely be turned on by -O2 optimization.
34
35mit/config/sunLib.rules -- If HasGcc and GccVersion > 1 are true, then
36use gcc -fpic to generate PIC code.  Make sure that gcc does not use
37gas (the GNU assembler) when compiling PIC code; gas does not assemble
38it correctly.
39
40***If you have gas installed where gcc uses it by default, you might have
41to add -B/bin/ to the PositionIndependentCFlags.***
42
43mit/config/site.def -- Define GccVersion to be 2.
44
45mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization.
46
47mit/config/sunLib.rules -- When compiling with GCC 2, use -fpic for
48position independent code generation.
49
50mit/rgb/Imakefile -- No longer need to compile some modules with 
51cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code.
52
53mit/server/os/Imakefile -- Likewise.
54
55mit/server/ddx/sun/Imakefile -- When compiling with GCC 2, some modules
56should be compiled with -fvolatile.
57
58mit/clients/twm/Imakefile -- Fix bad decls of malloc, realloc in gram.c.
59
60mit/lib/X/Imakefile -- Make libgcc.a a required lib for libX11.so
61
62*** mit/clients/twm/Imakefile	Mon May 17 22:05:22 1993
63--- new/clients/twm/Imakefile	Mon May 17 22:28:46 1993
64***************
65*** 32,41 ****
66--- 32,48 ----
67  ComplexProgramTarget(twm)
68  InstallNonExecFile(system.twmrc,$(TWMDIR))
69  
70+ #if HasGcc && GccVersion > 1 && defined (SunArchitecture)
71  gram.h gram.c: gram.y
72  	yacc $(YFLAGS) gram.y
73+ 	sed -e 's/^extern char \*malloc(), \*realloc();//g' y.tab.c >gram.c
74+ 	$(MV) y.tab.h gram.h
75+ #else
76+ gram.h gram.c: gram.y
77+ 	yacc $(YFLAGS) gram.y
78  	$(MV) y.tab.c gram.c
79  	$(MV) y.tab.h gram.h
80+ #endif
81  
82  clean::
83  	$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c 
84*** mit/config/Imake.tmpl	Mon May 17 22:02:57 1993
85--- new/config/Imake.tmpl	Mon May 17 22:15:06 1993
86***************
87*** 500,506 ****
88--- 500,510 ----
89  #endif
90  #ifndef CcCmd
91  #if HasGcc
92+ #if GccVersion > 1
93+ #define CcCmd gcc -fpcc-struct-return
94+ #else
95  #define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
96+ #endif
97  #else
98  #define CcCmd cc
99  #endif
100*** mit/config/site.def	Mon May 17 22:02:44 1993
101--- new/config/site.def	Mon May 17 22:22:28 1993
102***************
103*** 25,31 ****
104  
105  #ifdef BeforeVendorCF
106  
107! /* #define HasGcc YES */
108  
109  #endif /* BeforeVendorCF */
110  
111--- 25,33 ----
112  
113  #ifdef BeforeVendorCF
114  
115! #define HasGcc YES
116! /* GccVersion > 1 implies building shared libraries with gcc */
117! #define GccVersion 2
118  
119  #endif /* BeforeVendorCF */
120  
121*** mit/config/sun.cf	Mon May 17 22:03:02 1993
122--- new/config/sun.cf	Mon May 17 22:24:55 1993
123***************
124*** 41,49 ****
125--- 41,55 ----
126  
127  #if HasGcc
128  
129+ #if GccVersion > 1
130+ #define OptimizedCDebugFlags -O2
131+ #else
132+ #define OptimizedCDebugFlags -O
133  #define SharedLibraryCcCmd cc
134  #define ExtraLoadFlags -B/usr/bin/
135  #define AllocateLocalDefines /**/
136+ #endif
137+ 
138  
139  .c.o:
140  	$(CC) -c $(CFLAGS) $*.c
141*** mit/config/sunLib.rules	Mon May 17 22:02:46 1993
142--- new/config/sunLib.rules	Mon May 17 22:19:06 1993
143***************
144*** 23,29 ****
145--- 23,33 ----
146  #define SharedLibraryLoadFlags -assert pure-text
147  #endif
148  #ifndef PositionIndependentCFlags
149+ #if defined(HasGcc) && GccVersion > 1
150+ #define PositionIndependentCFlags -fpic
151+ #else
152  #define PositionIndependentCFlags -pic
153+ #endif
154  #endif
155  
156  /*
157*** mit/lib/X/Imakefile	Mon May 17 22:05:03 1993
158--- new/lib/X/Imakefile	Mon May 17 22:32:26 1993
159***************
160*** 9,14 ****
161--- 9,31 ----
162  #define MotifBC NO
163  #endif
164  
165+ #if defined(SunArchitecture)
166+ #if SystemV4
167+ #if HasGcc
168+ REQUIREDLIBS= -lgcc -lc
169+ #else
170+ REQUIREDLIBS= -lc
171+ #endif
172+ #else
173+ #if HasGcc && GccVersion > 1
174+ XCOMM Hack to fix gcc 2 ``-nostdlib'' deficiency on SunOS 4.x
175+ REQUIREDLIBS= `gcc -v 2>&1 | awk '{print $$4}' | sed -e 's/specs$$/libgcc.a/'`
176+ #else
177+ REQUIREDLIBS=
178+ #endif
179+ #endif
180+ #endif
181+ 
182  #ifndef BuildXimp
183  #define BuildXimp NO
184  #endif
185*** mit/rgb/Imakefile	Mon May 17 22:05:31 1993
186--- new/rgb/Imakefile	Mon May 17 22:25:30 1993
187***************
188*** 17,23 ****
189  #if !(defined(SGIArchitecture) || SystemV4)
190         DBMLIB = -ldbm
191  #endif
192! #if defined(SparcArchitecture) && HasGcc
193             CC = cc
194      CCOPTIONS = /**/
195      EXTRA_LOAD_FLAGS = /**/
196--- 17,23 ----
197  #if !(defined(SGIArchitecture) || SystemV4)
198         DBMLIB = -ldbm
199  #endif
200! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1
201             CC = cc
202      CCOPTIONS = /**/
203      EXTRA_LOAD_FLAGS = /**/
204*** mit/server/ddx/sun/Imakefile	Mon May 17 22:05:57 1993
205--- new/server/ddx/sun/Imakefile	Mon May 17 22:27:23 1993
206***************
207*** 43,48 ****
208--- 43,53 ----
209  LinkFile(sunGX.o,sunGX.o.dist)
210  #endif
211  
212+ #if HasGcc && GccVersion > 1
213+ SpecialObjectRule(sunCG2C.o,sunCG2C.c,-fvolatile)
214+ SpecialObjectRule(sunCG2M.o,sunCG2M.c,-fvolatile)
215+ #endif
216+ 
217  sunInitExtMono.o: $(ICONFIGFILES)
218  ObjectFromSpecialSource(sunInitExtMono,../mi/miinitext,-UPEXEXT)
219  ObjectFromSpecialSource(sunInitMono,sunInit,-DMONO_ONLY)
220*** mit/server/os/Imakefile	Mon May 17 22:05:46 1993
221--- new/server/os/Imakefile	Mon May 17 22:26:02 1993
222***************
223*** 132,138 ****
224  SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
225  SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
226  SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
227! #if defined(SparcArchitecture) && HasGcc
228  oscolor.o: $(ICONFIGFILES)
229  	$(RM) $@
230  	cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
231--- 132,138 ----
232  SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
233  SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
234  SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
235! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1
236  oscolor.o: $(ICONFIGFILES)
237  	$(RM) $@
238  	cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
239
240
241[This is the older version]
242
243How to compile X11R5 (patch level 11) with GCC version 2:
244
245The patches include support for building the shared libraries with GCC 2 on 
246the Sparc and 68k machines.
247
248NOTE: Such shared libraries built with GCC version 2.3 DID NOT WORK
249with executables previously linked using Sun CC!  This is because
250neither those executables nor the gcc-compiled shared libraries contain
251libgcc.a.  The shared libraries did work with executables linked using
252GCC (running the Sun linker, of course) because GCC tells the linker to
253link in libgcc.a.  Because of these limitations the default behavior is
254to NOT build the shared libraries with gcc.
255
256Changes in GCC 2.4 seem to have eliminated the problem, and such a
257shared library now seems work with all executables.  If you want the
258gcc-compiled shared libraries turn on "Gcc2BuildLibs" in site.def.  If
259you try this, please tell bug-gcc@prep.ai.mit.edu whether it works.
260
261Sun forgot to include a static version of libdl.a with some versions
262of SunOS (4.1 mainly).  If you see undefined symbols _dlopen, _dlsym,
263or _dlclose when linking with -lX11, compile and link against the file
264mit/util/misc/dlsym.c in the MIT X11R5 distribution.
265
266mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2.  If
267-fstrength-reduce (or any other -f option) is a major win, then it will
268most likely be turned on by -O2 optimization.
269
270mit/config/sunLib.rules -- If HasGcc2 and Gcc2BuildLibs are defined, then 
271use gcc -fpic to generate PIC code.  Make sure that gcc does not use gas (the 
272GNU assembler) when compiling PIC code; gas does not assemble it correctly.  
273If you have gas installed where gcc uses it by default, you might have to add
274-B/bin/ to the PositionIndependentCFlags.
275
276mit/config/site.def -- Define HasGcc2 to be YES.
277
278mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization.
279
280mit/rgb/Imakefile -- No longer need to compile some modules with 
281cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code.
282
283mit/server/os/Imakefile -- Likewise.
284
285mit/clients/twm/Imakefile -- fix bad decls of malloc, realloc in gram.c.
286
287*** mit/config/Imake.tmpl.ORIG	Tue Dec 31 11:07:56 1991
288--- mit/config/Imake.tmpl	Tue Dec 31 12:30:47 1991
289***************
290*** 499,508 ****
291--- 499,512 ----
292  #define HasGcc NO
293  #endif
294  #ifndef CcCmd
295+ #if HasGcc2
296+ #define CcCmd gcc -fpcc-struct-return
297+ #else
298  #if HasGcc
299  #define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
300  #else
301  #define CcCmd cc
302+ #endif
303  #endif
304  #endif
305  #if HasFortran
306*** mit/config/sunLib.rules.ORIG	Tue Dec 31 11:11:24 1991
307--- mit/config/sunLib.rules	Tue May  5 12:26:12 1992
308***************
309*** 23,30 ****
310--- 23,34 ----
311  #define SharedLibraryLoadFlags -assert pure-text
312  #endif
313  #ifndef PositionIndependentCFlags
314+ #if defined(HasGcc2) && defined (Gcc2BuildLibs)
315+ #define PositionIndependentCFlags -fpic
316+ #else
317  #define PositionIndependentCFlags -pic
318  #endif
319+ #endif
320  
321  /*
322   * InstallSharedLibrary - generate rules to install the shared library.
323*** mit/config/site.def.ORIG	Tue Dec 31 11:13:49 1991
324--- mit/config/site.def	Tue Dec 31 12:02:59 1991
325***************
326*** 25,31 ****
327  
328  #ifdef BeforeVendorCF
329  
330! /* #define HasGcc YES */
331  
332  #endif /* BeforeVendorCF */
333  
334--- 25,33 ----
335  
336  #ifdef BeforeVendorCF
337  
338! #define HasGcc YES 
339! #define HasGcc2 YES
340! /* #define Gcc2BuildLibs YES */
341  
342  #endif /* BeforeVendorCF */
343  
344*** mit/config/sun.cf.ORIG	Tue Dec 31 11:13:57 1991
345--- mit/config/sun.cf	Tue May  5 12:29:50 1992
346***************
347*** 34,42 ****
348--- 41,61 ----
349  
350  #if HasGcc
351  
352+ #if defined(HasGcc2) 
353+ #define OptimizedCDebugFlags -O2 
354+ /* Leave Alone XXX */
355+ #else 
356+ #define OptimizedCDebugFlags -O
357  #define SharedLibraryCcCmd cc
358  #define ExtraLoadFlags -B/usr/bin/
359  #define AllocateLocalDefines /**/
360+ #endif
361+ 
362+ #if !defined(Gcc2BuildLibs)
363+ #define SharedLibraryCcCmd cc
364+ #define ExtraLoadFlags -B/usr/bin/
365+ #define AllocateLocalDefines /**/
366+ #endif
367  
368  .c.o:
369  	$(CC) -c $(CFLAGS) $*.c
370*** mit/rgb/Imakefile.ORIG	Wed Jan 15 16:43:18 1992
371--- mit/rgb/Imakefile	Thu Jan  2 13:34:09 1992
372***************
373*** 17,23 ****
374  #if !(defined(SGIArchitecture) || SystemV4)
375         DBMLIB = -ldbm
376  #endif
377! #if defined(SparcArchitecture) && HasGcc
378             CC = cc
379      CCOPTIONS = /**/
380      EXTRA_LOAD_FLAGS = /**/
381--- 17,23 ----
382  #if !(defined(SGIArchitecture) || SystemV4)
383         DBMLIB = -ldbm
384  #endif
385! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
386             CC = cc
387      CCOPTIONS = /**/
388      EXTRA_LOAD_FLAGS = /**/
389*** mit/server/os/Imakefile.ORIG	Wed Jan 15 16:46:23 1992
390--- mit/server/os/Imakefile	Wed Jan 15 16:46:48 1992
391***************
392*** 132,138 ****
393  SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
394  SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
395  SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
396! #if defined(SparcArchitecture) && HasGcc
397  oscolor.o: $(ICONFIGFILES)
398  	$(RM) $@
399  	cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
400--- 132,138 ----
401  SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
402  SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
403  SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
404! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
405  oscolor.o: $(ICONFIGFILES)
406  	$(RM) $@
407  	cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
408*** 1.1 1992/09/08 19:52:07
409--- mit/server/ddx/sun/Imakefile        1992/09/08 21:10:22
410***************
411*** 43,48 ****
412--- 43,53 ----
413  LinkFile(sunGX.o,sunGX.o.dist)
414  #endif
415
416+ #if HasGcc2
417+ SpecialObjectRule(sunCG2C.o,sunCG2C.c,-fvolatile)
418+ SpecialObjectRule(sunCG2M.o,sunCG2M.c,-fvolatile)
419+ #endif
420+ 
421  sunInitExtMono.o: $(ICONFIGFILES)
422  ObjectFromSpecialSource(sunInitExtMono,../mi/miinitext,-UPEXEXT)
423  ObjectFromSpecialSource(sunInitMono,sunInit,-DMONO_ONLY)
424
425*** /tmp/RCSAa24446     Tue Sep 15 12:23:32 1992
426--- mit/clients/twm/Imakefile   Thu Aug 13 18:18:07 1992
427***************
428*** 32,41 ****
429--- 32,48 ----
430  ComplexProgramTarget(twm)
431  InstallNonExecFile(system.twmrc,$(TWMDIR))
432  
433+ #if HasGcc2 && defined (SunArchitecture)
434  gram.h gram.c: gram.y
435        yacc $(YFLAGS) gram.y
436+       sed -e 's/^extern char \*malloc(), \*realloc();//g' y.tab.c >gram.c
437+       $(MV) y.tab.h gram.h
438+ #else
439+ gram.h gram.c: gram.y
440+       yacc $(YFLAGS) gram.y
441        $(MV) y.tab.c gram.c
442        $(MV) y.tab.h gram.h
443+ #endif
444  
445  clean::
446        $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c 
447
448