tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Traditional cpp and assembler, revisited



Joerg Sonnenberger writes:
- Hi all,
- last year we already had a discussion about -traditional-cpp in the
- context of clang and the interaction with assembler. Since this is one
- of the show-stoppers for building the system with clang, I would like to
- revisit this and come to a decision. As discussed, there are esentially
- three different options:
- 
        [...]
- 
- (3) Stop using the C preprocessor for assembler sources and switch to
- some other preprocessor like m4. This is more involved since it requires
- changing assembler code that uses e.g. machine/asm.h. It can also lead
- to some duplication between m4 macro library and C headers. Positive
- effect is that it would force us to visit all assembler files (at least
- for the architectures clang/llvm support). Things like DWARF unwind
- frames could be added to improve debugging support.
- 
- For legacy compatibility, (2) is the least amount of work and helps
- other users of K&R-CPP like imake. (3) has its own merits. What is the
- direction NetBSD wants to take?

I did (3) while at CONVEX in 1992.  We changed to an ANSI C (c89)
compiler for the OS at ConvexOS 9.0 or 10.0 (It was a long time
ago, I don't remember the actual release.)

I modified the libc build to eliminate all the small wrapper sources
for the system calls, as well as creating the needed m4 macro sets
and creating the distribution mechanisms.

I seem to remember it took me about a month design and implement
everything, using a System V style m4 (as implemented by gnu m4
circa 1992.)

I may have copies of what I did in 1992 around here someone
(anyone got a 9 track drive in D/FW, TX? :D)

All in all, this is hardly a new idea, and there is a
"historical" implementation that can be followed.

--
Eric Schnoebelen                eric%cirr.com@localhost         
http://www.cirr.com
        Unix Wizards are real people -- Edward L. Wilson III


Home | Main Index | Thread Index | Old Index