Hi,
the following patch can be applied both to filo-0.6b and libpayload, and is one of several changes to make things build on solaris.
The changes: 1. Preset CC to gcc in Makefile. There are some $(shell $(CC) ...) invocations with GCC specific options, so that shouldn't hurt.
2. Replace stdbool.h include in util/kconfig/expr.h by a custom implementation of booleans. This is okay as these booleans are purely internal. It's necessary because there's some disagreement between the Solaris headers and GCC on Solaris, about when stdbool.h is appropriate.
3. Remove stdbool.h include from util/kconfig/zconf.tab.c_shipped. This file includes expr.h already, so it picks up the right set of primitives, without duplicating the special case for Solaris.
Comments?
Patrick Georgi
Patrick Georgi wrote:
- Preset CC to gcc in Makefile.
- Replace stdbool.h include in util/kconfig/expr.h by a custom
implementation of booleans. 3. Remove stdbool.h include from util/kconfig/zconf.tab.c_shipped.
Comments?
Simple changes, better portability.
For both libpayload and FILO, please consider the patch to be:
Acked-by: Peter Stuge peter@stuge.se
Hi,
On Thu, Sep 18, 2008 at 06:58:01PM +0200, Patrick Georgi wrote:
the following patch can be applied both to filo-0.6b and libpayload, and is one of several changes to make things build on solaris.
Does the stdbool problem also happen with the Linux kernel upstream kconfig (i.e. if you try to build a Linux kernel on Solaris)? If yes, that sounds like a worthwhile patch to submit for upstream kconfig as well.
If not, maybe this has been fixed upstream in the mean time? I sort of doubt it though, our libpayload kconfig is pretty recent...
Either way, the same fix is likely needed for all other kconfigs we use? E.g. v3, buildrom, coreinfo, etc?
The changes:
Preset CC to gcc in Makefile. There are some $(shell $(CC) ...) invocations with GCC specific options, so that shouldn't hurt.
Replace stdbool.h include in util/kconfig/expr.h by a custom implementation of booleans. This is okay as these booleans are purely internal. It's necessary because there's some disagreement between the Solaris headers and GCC on Solaris, about when stdbool.h is appropriate.
Remove stdbool.h include from util/kconfig/zconf.tab.c_shipped. This file includes expr.h already, so it picks up the right set of primitives, without duplicating the special case for Solaris.
Uwe.
Uwe Hermann schrieb:
Does the stdbool problem also happen with the Linux kernel upstream kconfig (i.e. if you try to build a Linux kernel on Solaris)? If yes, that sounds like a worthwhile patch to submit for upstream kconfig as well.
No idea - I don't build linux kernels.
If not, maybe this has been fixed upstream in the mean time? I sort of doubt it though, our libpayload kconfig is pretty recent...
Do they care about portability?
Either way, the same fix is likely needed for all other kconfigs we use? E.g. v3, buildrom, coreinfo, etc?
Probably yes. It can't hurt.
Patrick Georgi
Patrick Georgi wrote:
If not, maybe this has been fixed upstream in the mean time? I sort of doubt it though, our libpayload kconfig is pretty recent...
Do they care about portability?
I think they do, yes.
//Peter