Skip to content
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

make compilation with xcc work again (fix issue #17095) #17267

Merged
merged 3 commits into from
Jul 3, 2019

Conversation

npitre
Copy link
Collaborator

@npitre npitre commented Jul 2, 2019

Fixes #17095

Nicolas Pitre added 3 commits July 2, 2019 16:19
Commit f57ba2d ("cmake: toolchain_cc_imacros: don't use space
separated arguments") moved toolchain_cc_imacros() to using the long
argument format in order to avoid spaces that CMake uses to delimitate
and deduplicate arguments.

It seems that xcc doesn't support the --imacros=foo form. However
it does support the short "combined" -imacrosfoo form (without space).
So let's use that instead and document the caviat.

Signed-off-by: Nicolas Pitre <[email protected]>
The zephyr_stdint.h file enforces Zephyr specific policies on the
compilation environment. Let's give compilers a chance to provide
definitions of their own via TOOLCHAIN_C_FLAGS prior the inclusion
of zephyr_stdint.h.

Signed-off-by: Nicolas Pitre <[email protected]>
Ensure that xcc is at parity with gcc and clang by inferring missing
definitions based on those that it already provides.

Signed-off-by: Nicolas Pitre <[email protected]>
Copy link
Member

@jhedberg jhedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine in my own xcc tests, thanks!

@jhedberg jhedberg added area: Xtensa Xtensa Architecture bug The issue is a bug, or the PR is fixing a bug labels Jul 3, 2019
@ioannisg ioannisg added the Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. label Jul 3, 2019
@nashif nashif merged commit 635491b into zephyrproject-rtos:master Jul 3, 2019
@npitre npitre deleted the xcc branch July 19, 2019 15:49
@marc-hb
Copy link
Collaborator

marc-hb commented Jul 9, 2020

Thanks @tejlmand for mentioning in PR #24851 this CMake 3.12 anti-deduplication feature:
"SHELL:-imacros A" "SHELL:-imacros B"
https://cmake.org/cmake/help/v3.12/command/target_compile_options.html

While beneficial for individual options, the de-duplication step ...

(I never understood this "benefice" BTW)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Build System area: Xtensa Xtensa Architecture bug The issue is a bug, or the PR is fixing a bug Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building with Xtensa toolchain fails
6 participants