From: Graeme Russ Date: Tue, 18 Nov 2008 08:17:54 +1100 Subject: [U-Boot] weak functions versus conditional compile Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I have a quick question I would like the groups opinion on: What is the rule-of-thumb for defining a function as weak versus using conditional compilation (or #defines)? For example, I am doing some work on cleaning up the structure and design of the i386 / sc520 code. Specifically, some functionality such as interrupts, timers and CPU reset have more 'powerful' implementations in the sc520. Should I declare these functions as weak in the core i386 code and use a config #define to override or should I seperate the functions out into seperate source files and use conditional compilation? Regards, Graeme