cvs commit: src/sys/security/mac_mls mac_mls.c

John Baldwin jhb at FreeBSD.org
Fri May 30 14:56:43 PDT 2003


On 30-May-2003 Ruslan Ermilov wrote:
> On Fri, May 30, 2003 at 02:25:10PM -0400, John Baldwin wrote:
>> 
>> On 30-May-2003 Robert Watson wrote:
>> > rwatson     2003/05/30 10:02:37 PDT
>> > 
>> >   FreeBSD src repository
>> > 
>> >   Modified files:
>> >     sys/security/mac_mls mac_mls.c 
>> >   Log:
>> >   Make sure all character pointers are properly initialized; this was
>> >   mismerged from the MAC tree, and didn't get picked up because warnings
>> >   are not normally fatal in per-module builds, only when they are linked
>> >   into a kernel (such as LINT).
>> 
>> Can someone make module builds use the same warning flags and
>> settings as kernel builds please?  This same scenario has happened
>> numerous times now.
>> 
> This is not easy.  For the kernel build, we have NORMAL_C and
> NORMAL_C_NOWERROR (the former includes WERROR?= -Werror).
> There are lot of files in sys/conf/files* that are marked with
> "nowerror", and I'm sure they will break to compile as modules
> with this patch, e.g., the acpi module has lot of files with
> warnings:

This is just a symptom of the problem that module Makefiles duplicate
metadata in sys/conf/files (namely the list of files in a given module).
The modules Makefile's should somehow be changed to get their list of
files (as well as nowerror settings) from the sys/conf/files.  Essentially,
you almost want to build the acpi module like so:

% cd modules/acpi
% cat conf
# ACPI module configuration

device          acpi
% config conf
... generate makefiles, etc. ...
% make
... compiles acpi.ko ...

And avoid having to duplicate the metadata about what belongs in a
module.  Basically, you build a kernel that doesn't include standard
and doesn't require a CPU keyword.

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the cvs-all mailing list