From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 06 Nov 2012 11:04:34 -0700 Subject: [U-Boot] [PATCH 1/3] common: add ifdefs around bouncebuf.c body In-Reply-To: References: <1352156642-7975-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <50995132.1060508@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/05/2012 04:47 PM, Simon Glass wrote: > Hi Stephen, > > On Mon, Nov 5, 2012 at 3:04 PM, Stephen Warren wrote: >> From: Stephen Warren >> >> If a U-Boot config file enables CONFIG_BOUNCE_BUFFER only for the main >> U-Boot build and not for the SPL, then config.mk will contain >> CONFIG_BOUNCE_BUFFER=y, so common/Makefile will build bouncebuf.c for >> both the SPL and main U-Boot, but config.h won't set CONFIG_BOUNCE_BUFFER >> for the SPL, so bouncebuf.h will provide static inline functions, which >> will conflict with the compiled bouncebuf.c. Solve this by guarding the >> body of bouncebuf.c with the ifdef to avoid conflicts. >> >> Signed-off-by: Stephen Warren > > Acked-by: Simon Glass > > This seems like a problem that might come up in other areas. I wonder > if SPL should have its own autoconf.mk? That might be a good idea. Is the config.h separate for SPL-vs-non-SPL? Perhaps it doesn't need to be because it's simply always evaluated at each individual compile time, whereas perhaps autoconf.mk is generated once rather than evaluated? As you can tell, I have not looked into this or most aspects of U-Boot's build system, so I have no idea how feasible fixing the build system for this would be.