diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-01-20 18:36:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-03 15:00:50 -0800 |
commit | bc404c94b4ab1e6a62e607fd7ef034aa31d6388e (patch) | |
tree | 559e85fa8eca3ee7156f9f5333707755c43905c6 /driver | |
parent | fc9ed52397f232bfc9f9d2b448e8bc253c87379f (diff) | |
download | chrome-ec-bc404c94b4ab1e6a62e607fd7ef034aa31d6388e.tar.gz |
Enforce compilation without system headers
This patch introduces HOST_CPPFLAGS to be used for all
objects being compiled with HOSTCC rather then the target
compiler.
Since glibc is not linked into the EC, no glibc include files
should be included in the EC code base. Hence, create local
definitions for clock_t and wchar_t that match what the glibc
include would have done, and remove some unneeded includes.
Due to very eager optimization, we have to give gcc a little
notch to not kick out memset.
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
BUG=chrome-os-partner:43025
BUG=chrome-os-partner:49517
BRANCH=none
TEST=compile tested
Change-Id: Idf3a2881fa8352756b0927b09c6a97473358f239
Reviewed-on: https://chromium-review.googlesource.com/322435
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/als_si114x.c | 2 | ||||
-rw-r--r-- | driver/pi3usb30532.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/driver/als_si114x.c b/driver/als_si114x.c index bdd39fa5b0..5a64be92cd 100644 --- a/driver/als_si114x.c +++ b/driver/als_si114x.c @@ -219,7 +219,7 @@ static int irq_handler(struct motion_sensor_t *s, uint32_t *event) /* Just trigger a measurement */ static int read(const struct motion_sensor_t *s, vector_3_t v) { - int ret; + int ret = 0; uint8_t cmd; struct si114x_drv_data_t *data = SI114X_GET_DATA(s); diff --git a/driver/pi3usb30532.h b/driver/pi3usb30532.h index 96c963204b..15a9241239 100644 --- a/driver/pi3usb30532.h +++ b/driver/pi3usb30532.h @@ -8,8 +8,6 @@ #ifndef __CROS_EC_PI3USB30532_H #define __CROS_EC_PI3USB30532_H -#include <inttypes.h> - #include "usb_pd.h" /* USB switch registers */ |