From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sat, 13 Jun 2009 10:19:01 -0700 Subject: [U-Boot] [patch] rm9200 ethernet driver: board-specific quirk (csb337) In-Reply-To: <200906131113.51509.vapier@gentoo.org> References: <200906091114.24166.david-b@pacbell.net> <20090613145439.GG25406@game.jcrosoft.org> <200906131113.51509.vapier@gentoo.org> Message-ID: <200906131019.01529.david-b@pacbell.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday 13 June 2009, Mike Frysinger wrote: > > > > > See above. ?There already *IS* such an #ifdef, but it's just not > > > > > cluttering up the guts of that driver. > > > > > > > > you adding MUST have NO size impact on other board > > > > > > > > if we apply you code as it we will increase the size of u-boot for > > > > every rm9200 board that use the ethernet Not on any compiler I've used for at least the past dozen years or so. > > > i dont get it. ?the CPP expands into if(0) and unless you have a > > > completely shitty compiler, gcc will do dead code elimination on it > > > resulting in the same binary size. > > > > I've seen to much "shitty version" that does not do it correctly > > so I prefer ot avoid the problem Which compiler versions are that broken? And are used regularly to build rm9200 U-Boot code? At normal optimization levels? (We know that disabling optimization puts out all kinds of crap.) This is really basic stuff: "if (0) { dead } else { live }" and the converse. > i'm pretty sure we're already relying on this behavior. ?so you've got a > bigger problem that needs addressing (i.e. shit can that compiler) than what > David is proposing. I know that when Linux started relying on that type of dead-code elimination quite a few years back, nobody thought this was a real issue. And Linux is, on the whole, far more demanding of compilers than U-Boot.