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.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3592 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index 9254de7..d5b29e2 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -49,6 +49,7 @@
Q := @
endif
+CC = gcc
HOSTCC = gcc
HOSTCXX = g++
HOSTCFLAGS := -I$(srck) -I$(objk)
diff --git a/payloads/libpayload/util/kconfig/expr.h b/payloads/libpayload/util/kconfig/expr.h
index 9d4cba1..25ec05e 100644
--- a/payloads/libpayload/util/kconfig/expr.h
+++ b/payloads/libpayload/util/kconfig/expr.h
@@ -12,7 +12,12 @@
#include <stdio.h>
#ifndef __cplusplus
+#ifndef __sun
#include <stdbool.h>
+#else
+typedef short bool;
+enum { true=1, false=0};
+#endif
#endif
struct file {
diff --git a/payloads/libpayload/util/kconfig/zconf.tab.c_shipped b/payloads/libpayload/util/kconfig/zconf.tab.c_shipped
index 346c416..fa47f37 100644
--- a/payloads/libpayload/util/kconfig/zconf.tab.c_shipped
+++ b/payloads/libpayload/util/kconfig/zconf.tab.c_shipped
@@ -158,7 +158,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdbool.h>
#define LKC_DIRECT_LINK
#include "lkc.h"