Subject: Re: WARNING
To: Eric Schnoebelen <>
From: Todd Vierling <>
List: current-users
Date: 11/13/2001 12:31:05
On Tue, 13 Nov 2001, Eric Schnoebelen wrote:

: - [*] The fact that CPP is used anywhere in the build system is a botch.  This
: -     will be changed to use ${CC} -E where appropriate, or by building a
: -     different way where ${CPP} is grossly abused, like it was in libc.
: 	What I did when I overhauled ConvexOS's libc build in
: the early 90's was convert the syscall generations into m4
: macro's instead of CPP macros.  As I recall, the problem I was
: attempting to solve revolved around the differences between the
: Classic C CPP implementation verses the ANSI C CPP
: implementation.

However, we have a very extensive set of macros in .h files, so I don't
think we'll be moving them to m4 any time soon.  It works as-is for us,
because our compile rules for .S include the gcc option "-traditional-cpp".
This makes the cpp behave in a K&R fashion.

: 	A late model m4 (sysv extentions) and a few lines of
: in-line sh in the libc makefiles could generate all of the
: needed system calls from syscall.h.

Getting the list of syscalls from syscall.h might be a good idea, but there
are actually three types of syscall stubs (see src/lib/libc/;
there's ASM, NOERR, and PSEUDONOERR).  Deciding which to use could get icky.

However, it's still important to have the stubs generated as standalone .S
files, so that they participate in the library build process like all other
source files (eliminating the special rules for .o, .so, and .po that
src/lib/libc/ had before).

-- Todd Vierling <>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --