From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 5 Mar 2008 20:08:00 -0800 From: Andrew Morton Subject: Re: [patch 2/8] Kbuild: Create a way to create preprocessor constants from C expressions Message-Id: <20080305200800.23ee10ec.akpm@linux-foundation.org> In-Reply-To: <20080305223845.436523065@sgi.com> References: <20080305223815.574326323@sgi.com> <20080305223845.436523065@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: ak@suse.de, Sam Ravnborg , Mel Gorman , apw@shadowen.org, KAMEZAWA Hiroyuki , KOSAKI Motohiro , Rik van Riel , linux-mm@kvack.org List-ID: On Wed, 05 Mar 2008 14:38:17 -0800 Christoph Lameter wrote: > The use of enums create constants that are not available to the preprocessor > when building the kernel (f.e. MAX_NR_ZONES). > > Arch code already has a way to export constants calculated to the > preprocessor through the asm-offsets.c file. Generate something > similar for the core kernel through kbuild. > err, this patch needs help. > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ linux-2.6/include/linux/bounds.h 2008-02-29 19:29:50.000000000 -0800 > @@ -0,0 +1,10 @@ > +#ifndef __LINUX_BOUNDS_H__ > +#define __LINUX_BOUNDS_H__ > +/* > + * DO NOT MODIFY. > + * > + * This file was generated by Kbuild > + * > + */ > + > +#endif a) I'm not sure that we should check in a file which is supposed to get overwritten at build-time. b) Is this `make O=' friendly? c) make mrproper make allmodconfig make In file included from include/linux/mm.h:192, from include/linux/suspend.h:11, from arch/x86/kernel/asm-offsets_64.c:12, from arch/x86/kernel/asm-offsets.c:4: include/linux/page-flags.h:10:26: error: linux/bounds.h: No such file or directory -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org