soc: intel_s1000: add dummy atexit() for Clang++

Add a dummy atexit() function when compiling C++ source files
using Clang++.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-12-16 17:37:49 -08:00 committed by Johan Hedberg
commit 60db257e69
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library_sources_ifdef(CONFIG_CPLUSPLUS cpp_fixes.c)
zephyr_library_sources_ifdef(CONFIG_NEWLIB_LIBC newlib_fixes.c)

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2019, Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#ifdef __clang__
int atexit(void (*function)(void))
{
return 0;
}
#endif /* __clang__ */