-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Testbench: Avoid need linux kernel headers in build
This patch adds simplified linux/types.h into testbench headers to enable include of ALSA asoc.h to build without other difficult kernel headers content. The CMakeLists.txt files are updated to make a build time copy of asoc.h to subdirectory include of the build directories. The new directory is added to headers path. This change avoids build fail with xcc toolchain that can't use the gcc toolchain headers from the system where the ALSA headers are located. Suggested-by: Marc Herbert <[email protected]> Signed-off-by: Seppo Ingalsuo <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause */ | ||
|
||
#ifndef __TESTBENCH_LINUX_TYPES_H__ | ||
#define __TESTBENCH_LINUX_TYPES_H__ | ||
|
||
#include <stdint.h> | ||
|
||
/* | ||
* This header files allows to include asoc.h for topology parsing to | ||
* non-gcc builds with other C library, e.g. the one that is used by | ||
* xt-xcc compiler. The kernel linux/types.h cannot be used because | ||
* the other definitions there are not compatible with the toolchain. | ||
*/ | ||
|
||
/* There are minimum types needed for alsa/sound/uapi/asoc.h */ | ||
|
||
typedef int64_t __le64; | ||
typedef int32_t __le32; | ||
typedef int16_t __le16; | ||
typedef uint8_t __u8; | ||
|
||
#endif /* __TESTBENCH_LINUX_TYPES_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause */ | ||
|
||
#ifndef __TPLG_PARSER_LINUX_TYPES_H__ | ||
#define __TPLG_PARSER_LINUX_TYPES_H__ | ||
|
||
#include <stdint.h> | ||
|
||
/* | ||
* This header files allows to include asoc.h for topology parsing to | ||
* non-gcc builds with other C library, e.g. the one that is used by | ||
* xt-xcc compiler. The kernel linux/types.h cannot be used because | ||
* the other definitions there are not compatible with the toolchain. | ||
*/ | ||
|
||
/* There are minimum types needed for alsa/sound/uapi/asoc.h */ | ||
|
||
typedef int64_t __le64; | ||
typedef int32_t __le32; | ||
typedef int16_t __le16; | ||
typedef uint8_t __u8; | ||
|
||
#endif /* __TPLG_PARSER_LINUX_TYPES_H__ */ |