From bc404c94b4ab1e6a62e607fd7ef034aa31d6388e Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 20 Jan 2016 18:36:20 -0800 Subject: 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 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 Tested-by: Patrick Georgi Reviewed-by: Patrick Georgi --- builtin/time.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 builtin/time.h (limited to 'builtin/time.h') diff --git a/builtin/time.h b/builtin/time.h new file mode 100644 index 0000000000..a069ae18c9 --- /dev/null +++ b/builtin/time.h @@ -0,0 +1,13 @@ +/* Copyright 2016 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* This header is only needed for CR50 compatibility */ + +#ifndef __CROS_EC_TIME_H__ +#define __CROS_EC_TIME_H__ + +#include + +#endif /* __CROS_EC_TIME_H__ */ -- cgit v1.2.1