From: "Loïc Minier" <loic.minier@linaro.org>
To: barebox@lists.infradead.org
Subject: [RFC] Fix misc warnings when building sandbox on 64-bits
Date: Fri, 14 Oct 2011 00:06:36 +0200 [thread overview]
Message-ID: <1318543601-20819-1-git-send-email-loic.minier@linaro.org> (raw)
Hi
I was getting a bunch of different warnings, some quite annoying ones,
when building sandbox on x86-64, not all of them related to 64-bits.
I'm completely new to the barebox codebase and not necessarily familiar
with the linux kernel header usage in barebox, so sending these patches
as RFC to see what others think of the fixes.
Some comments on the patches:
The first two seems pretty safe:
- Only pass -P to cpp when generating ld scripts
- Avoid warnings by using format(__printf__)
This one might change some API but seems right in terms of semantics;
sandbox builds and starts up fine:
- fprintf() returns an int
These two are some shots at supporting sandbox on x86-64:
- Use %p in format for pointers
- Use size_t for memory offsets
essentially I've noticed that nobody is setting
CONFIG_PHYS_ADDR_T_64BIT, yet barebox uses the resource_size_t type
which requires this config to be set properly. Now, because I don't
set CONFIG_PHYS_ADDR_T_64BIT in this patch series, what you'll get is
actually new warnings after the changes to use size_t or %p for
pointers because they are still stored on u32 on x86-64... Also, this
might break some API/ABI. I don't really know how to set
CONFIG_PHYS_ADDR_T_64BIT automatically for sandbox, so suggestions
welcome.
Thanks!
--
Loïc Minier
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2011-10-13 22:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 22:06 Loïc Minier [this message]
2011-10-13 22:06 ` [PATCH 1/5] Only pass -P to cpp when generating ld scripts Loïc Minier
2011-10-13 22:06 ` [PATCH 2/5] Avoid warnings by using format(__printf__) Loïc Minier
2011-10-14 6:50 ` Sascha Hauer
2011-10-13 22:06 ` [PATCH 3/5] fprintf() returns an int Loïc Minier
2011-10-14 7:04 ` Sascha Hauer
2011-10-13 22:06 ` [PATCH 4/5] Use %p in format for pointers Loïc Minier
2011-10-14 7:18 ` Sascha Hauer
2011-10-14 7:22 ` Sascha Hauer
2011-10-13 22:06 ` [PATCH 5/5] Use size_t for memory offsets Loïc Minier
2011-10-14 7:20 ` Sascha Hauer
2011-10-14 8:59 ` Loïc Minier
2011-10-14 12:11 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318543601-20819-1-git-send-email-loic.minier@linaro.org \
--to=loic.minier@linaro.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox