mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC] Fix misc warnings when building sandbox on 64-bits
@ 2011-10-13 22:06 Loïc Minier
  2011-10-13 22:06 ` [PATCH 1/5] Only pass -P to cpp when generating ld scripts Loïc Minier
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Loïc Minier @ 2011-10-13 22:06 UTC (permalink / raw)
  To: barebox

        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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-10-14 12:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 22:06 [RFC] Fix misc warnings when building sandbox on 64-bits Loïc Minier
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox