[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Don't use gnatCC2 and MAKE_DEPEND together.
- To: <us>
- Subject: Don't use gnatCC2 and MAKE_DEPEND together.
- From: Michael McClary <michael>
- Date: Wed, 10 Jan 90 22:59:42 PST
- Cc: <nat>, <natstitt>, <xanatech>
Summary: gnatCC2 breaks when run under make if the .KEEP_STATE option is used.
Workaround: Use makedepend instead.
Probable cause: Bug in Gnu preprocessor (gpp).
I'm sending this to "us" because it should be of interest to AMIX and Autodesk
natCC2 is the Nat Stit port of AT&T 2.0 C++ to SunOS 4.0.3. Its cfront
very occasionally produces code which exercises a bug in sun's C
preprocessor, causing the preprocessor to coredump.
gnatCC2 is a very minor hack of natCC2, which uses the Gnu C preprocessor
(gpp) in place of the Sun C preprocessor (cpp). It was done when the
backend and frontend teams encountered the bug.
.KEEP_STATE is a Sun feature. Compilers (and their preprocessors) runing
under "make" report the dependencies they discover, and "make" squirrels
these away in a file for later runs. "make" sets three environment
variables to tell the compilers that this information is desired, and
where to put it. gcc recognizes two of these variables.
As used in the gnatCC2 hack, gpp apparently drops the source on the floor
during the second (cc) major-pass. (This is a guess. What is known for
certain is that when the .KEEP_STATE environment variables are set, the
intermediate ..c file is generated correctly, but the hacked cc using gpp
silently produces a 36-byte "null" .o file, as if it had been handed an
empty input file.)
By the time the frontend and backend teams encountered the Sun preprocessor
coredump bug, and I patched it with the gnatCC2 hack, we had already
migrated our makefiles from use of .KEEP_STATE to the makedepend utility,
in the interest of portability. Thus, the bug went undetected until our
toolsmith, who was still using .KEEP_STATE, also encountered the coredump,
and switched to gnatCC2.