Subject: Compiling the kernel on low-memory machine
To: None <tech-kern@netbsd.org>
From: Aymeric Vincent <Aymeric.Vincent@labri.fr>
List: tech-kern
Date: 11/03/2002 16:38:56
While compiling a -current kernel on my Amiga 1200 with 8MB of RAM, I
noticed that files including sys/syscallargs.h take very long to
compile, because they cause cc1 to swap a lot.
All those small "struct xxx_args" seem to drive gcc crazy.
Have there already been plans to split sys/syscallargs.h in smaller
files, or to #ifdef parts of it?
I think keeping a single file is a good thing, but we could:
1. #ifdef chunks of syscalls depending on what they are related to,
and have C files which need a chunk #define the right macro
2. Use SYSCALL_ARGS_STARTING_IN_x macros to separate the syscalls whose
name start with the "x" letter (to keep the process
automatic), and have C files which depend on syscalls #define
the right macro(s)
3. Change the "struct" declarations into #define's of such structs so
that each C file expands the structs it wants.
I think I like 3., but since I'm not familiar with the implications
such a change could incur, I'd like to gather opinions here.
In any case, the solution would need to provide a big knob to include
all the struct's as they are now, because syscallargs.h is exported to
/usr/include.
Aymeric