Sound Open Firmware
Loading...
Searching...
No Matches
compiler_info.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright 2023 NXP
4 */
5
6#ifndef __SOF_COMPILER_INFO_H__
7#define __SOF_COMPILER_INFO_H__
8
9#if defined(__XCC__)
10
11#include <xtensa/hal.h>
12
13#define CC_MAJOR (XTHAL_RELEASE_MAJOR / 1000)
14#define CC_MINOR ((XTHAL_RELEASE_MAJOR % 1000) / 10)
15#define CC_MICRO XTHAL_RELEASE_MINOR
16#define CC_NAME "XCC"
17#define CC_DESC " " XCC_TOOLS_VERSION
18
19#elif defined(__GNUC__)
20
21#define CC_MAJOR __GNUC__
22#define CC_MINOR __GNUC_MINOR__
23#define CC_MICRO __GNUC_PATCHLEVEL__
24#define CC_NAME "GCC"
25#define CC_DESC ""
26
27#if CC_MAJOR >= 10
28#define CC_USE_LIBC
29#endif
30
31#else
32
33#error "Unsupported toolchain."
34
35#endif
36
37#endif /* __SOF_COMPILER_INFO_H__ */