-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for i.MX xt-clang build #7538
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,24 @@ | |
#ifndef XTENSA_CONFIG_CORE_H | ||
#define XTENSA_CONFIG_CORE_H | ||
|
||
/* | ||
* This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions | ||
* (identical to this one) in various implementations such as newlib, none of them is in use when | ||
* building SOF with Zephyr and XtensaTools. | ||
*/ | ||
|
||
#if defined(__ZEPHYR__) | ||
|
||
#ifndef __UINT32_C | ||
#define __UINT32_C(x) x ## U | ||
#endif | ||
|
||
#ifndef UINT32_C | ||
#define UINT32_C(x) __UINT32_C(x) | ||
#endif | ||
|
||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this really a suitable header for this? This seems some compiler compatibility support, how about xtos/include/sof/compiler_attributes.h? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure the xtos/ subfolder isn't used in Zephyr builds; I want the opposite (something that only applies to Zephyr) |
||
|
||
/* CONFIGURATION INDEPENDENT DEFINITIONS: */ | ||
#ifdef __XTENSA__ | ||
#include <xtensa/hal.h> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
#ifndef #define
pattern is at best a necessary evil because the definition can change depending the#include
order (recent example: 2512698) and the direction the wind blows.So can you transfer some of the information and justification from the commit message to the comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I had to put it in here in the first place, especially with the
__ZEPHYR__
guard, is because of the include order. On XTOS builds (including i.MX8) without that guard this is included before newlib and newlib does not do this, which leads to conflicts.I will copy the comment and resubmit, maybe today but if not on Tuesday. (edit: done)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What sort of conflicts? This is coming up again in non-Zephyr build #9351 (comment) ...
Maybe @keith-packard or @stephanosio could help us get out of this libc / toolchain nightmare?