On Monday 31 March 2008, Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: > > The envcrc.c does sizeof(unsigned long) when calculating the crc, but > > this is done with the build toolchain instead of the target toolchain, so > > if the build is a 64bit system but the target is 32bits, the size will > > obviously be wrong. This introduces a sizeof.sh script to calculate the > > required sizeof() value of any type with any compiler. > > > > Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]> > > --- > > Changes: > > - adds copyright/license > > - increase limit to 512 > > - increment by 4 bytes to find "32bit naturals" faster: > > (old/new # = number of times gcc is called) > > type | sizeof | old | new > > char | 1 | 1 | 5 > > short | 2 | 2 | 4 > > int | 4 | 4 | 2 > > long | 8 | 8 | 3 > > double | 8 | 8 | 3 > > Sorry, but I still think this is serious overkill which just slows down > the build process.
two or three executions of gcc will not affect the overall build speed in any way (which is what i proposed). > We need exactly one single case of this, i. e. sizeof(long). which is what you get. i posted the numbers only as reference, not because gcc actually gets executed that many times. > And > instead of tricking around all this here, I think we should rather > use somthing like "u32" in the code. if the value in question represents a CRC32, then that's what should have been used in the first place ... -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users