[U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
This sets __WORDSIZE to 8 correctly on 64-bit machines. Signed-off-by: Simon Glass --- Changes in v2: - Update commit message to remove 'temporary' - Allow __WORDSIZE to be defined in Makefile / elsewhere include/compiler.h | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/include/compiler.h b/include/compiler.h index 4e047c7..dc1a259 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -111,11 +111,21 @@ typedef unsigned int uint; #include #include +#if __SIZEOF_LONG__ == 8 +# define __WORDSIZE64 +#elif __SIZEOF_LONG__ == 4 +# define __WORDSIZE32 +#elif !defined __WORDSIZE +#error "__SIZEOF_LONG__ has unexpected value" +#endif + /* Types for `void *' pointers. */ #if __WORDSIZE == 64 typedef unsigned long int uintptr_t; -#else +#elif __WORDSIZE == 32 typedef unsigned intuintptr_t; +#else +#error "__WORDSIZE has unexpected value" #endif #endif -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Dear Simon Glass, In message <1318270953-32482-5-git-send-email-...@chromium.org> you wrote: > This sets __WORDSIZE to 8 correctly on 64-bit machines. > > Signed-off-by: Simon Glass > --- > Changes in v2: > - Update commit message to remove 'temporary' > - Allow __WORDSIZE to be defined in Makefile / elsewhere > > include/compiler.h | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de (null cookie; hope that's ok) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Dear Simon Glass, In message <1318270953-32482-5-git-send-email-...@chromium.org> you wrote: > This sets __WORDSIZE to 8 correctly on 64-bit machines. > > Signed-off-by: Simon Glass > --- > Changes in v2: > - Update commit message to remove 'temporary' > - Allow __WORDSIZE to be defined in Makefile / elsewhere > > include/compiler.h | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) This commit breaks building of all (or at least almost all, probbaly all ARM and PPC) boards: + ./MAKEALL ppc In file included from /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error "__SIZEOF_LONG__ has unexpected value" /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error "__WORDSIZE has unexpected value" In file included from /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: ... + ./MAKEALL arm In file included from /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error "__SIZEOF_LONG__ has unexpected value" /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error "__WORDSIZE has unexpected value" In file included from /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: ... This happend both when building on i686 and on x86_64 build hosts. Please fix. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de After a time, you may find that "having" is not so pleasing a thing, after all, as "wanting." It is not logical, but it is often true. -- Spock, "Amok Time", stardate 3372.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
On Monday, October 17, 2011 10:59:12 PM Wolfgang Denk wrote: > Dear Simon Glass, > > In message <1318270953-32482-5-git-send-email-...@chromium.org> you wrote: > > This sets __WORDSIZE to 8 correctly on 64-bit machines. > > > > Signed-off-by: Simon Glass > > --- > > Changes in v2: > > - Update commit message to remove 'temporary' > > - Allow __WORDSIZE to be defined in Makefile / elsewhere > > > > include/compiler.h | 12 +++- > > 1 files changed, 11 insertions(+), 1 deletions(-) > > This commit breaks building of all (or at least almost all, probbaly > all ARM and PPC) boards: > > + ./MAKEALL ppc > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error > "__SIZEOF_LONG__ has unexpected value" > /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error > "__WORDSIZE has unexpected value" In file included from > /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: > ... > > + ./MAKEALL arm > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error > "__SIZEOF_LONG__ has unexpected value" > /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error > "__WORDSIZE has unexpected value" In file included from > /home/wd/git/u-boot/work/include/image.h:36, from include/common.h:117: > ... > > This happend both when building on i686 and on x86_64 build hosts. > > Please fix. > > Best regards, > > Wolfgang Denk Finally, I'm not alone when it comes to breaking all boards ! :-) Simon, next time, try running the MAKEALL to check if nothing is broken :-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Hi Wolfgang, On Mon, Oct 17, 2011 at 1:59 PM, Wolfgang Denk wrote: > Dear Simon Glass, > > In message <1318270953-32482-5-git-send-email-...@chromium.org> you wrote: >> This sets __WORDSIZE to 8 correctly on 64-bit machines. >> >> Signed-off-by: Simon Glass >> --- >> Changes in v2: >> - Update commit message to remove 'temporary' >> - Allow __WORDSIZE to be defined in Makefile / elsewhere >> >> include/compiler.h | 12 +++- >> 1 files changed, 11 insertions(+), 1 deletions(-) > > This commit breaks building of all (or at least almost all, probbaly > all ARM and PPC) boards: > > + ./MAKEALL ppc > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error > "__SIZEOF_LONG__ has unexpected value" > /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error "__WORDSIZE > has unexpected value" > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > ... > > + ./MAKEALL arm > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > /home/wd/git/u-boot/work/include/compiler.h:119:2: error: #error > "__SIZEOF_LONG__ has unexpected value" > /home/wd/git/u-boot/work/include/compiler.h:128:2: error: #error "__WORDSIZE > has unexpected value" > In file included from /home/wd/git/u-boot/work/include/image.h:36, > from include/common.h:117: > ... > > This happend both when building on i686 and on x86_64 build hosts. > > Please fix. OK I will take a look now. Regards, Simon > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de > After a time, you may find that "having" is not so pleasing a thing, > after all, as "wanting." It is not logical, but it is often true. > -- Spock, "Amok Time", stardate 3372.7 > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Dear Marek Vasut, In message <201110172301.50564.marek.va...@gmail.com> you wrote: > > Finally, I'm not alone when it comes to breaking all boards ! :-) Guess we all do this, all the time. Some of us learn from it, others buy higher quality asbestos underwear ;-) Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de By the way, ALL software projects are done by iterative prototyping. Some companies call their prototypes "releases", that's all. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Dear Simon, In message you wrote: > > OK I will take a look now. Thanks. Note: I haven't pushed this upstream yet, so I can still rebase and merge a fix into this commit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de My brother sent me a postcard the other day with this big sattelite photo of the entire earth on it. On the back it said: "Wish you were here".- Steven Wright ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Hi Wolfgang, On Mon, Oct 17, 2011 at 2:05 PM, Wolfgang Denk wrote: > Dear Marek Vasut, > > In message <201110172301.50564.marek.va...@gmail.com> you wrote: >> >> Finally, I'm not alone when it comes to breaking all boards ! :-) > > Guess we all do this, all the time. > > Some of us learn from it, others buy higher quality asbestos underwear > ;-) It seems to be a new gcc feature that I am relying on (curse of the new toolchain). The fix is probably to #define it to 32 in the error case. I will update that patch and send to the mailing list. Regards, Simon > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de > By the way, ALL software projects are done by iterative prototyping. > Some companies call their prototypes "releases", that's all. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform
Hi Wolfgang, On Mon, Oct 17, 2011 at 2:10 PM, Wolfgang Denk wrote: > Dear Simon, > > In message > you > wrote: >> >> OK I will take a look now. > > Thanks. Note: I haven't pushed this upstream yet, so I can still > rebase and merge a fix into this commit. OK good - I have sent a v7 patch for this one commit. Regards, Simon > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de > My brother sent me a postcard the other day with this big sattelite > photo of the entire earth on it. On the back it said: "Wish you were > here". - Steven Wright > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot