-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
host toolchain for x86 fails on empty CMAKE_C_FLAGS #21614
Labels
area: Build System
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Comments
Hi, I would prefer this patch:
But I get another, presumably unrelated, error later in the build:
so before applying it I would appreciate it if you could confirm this patch works on your system. |
@SebastianBoe, the patch works for me. Thanks. |
SebastianBoe
added a commit
to SebastianBoe/zephyr
that referenced
this issue
Dec 31, 2019
Fix an issue with 'ZEPHYR_TOOLCHAIN_VARIANT=host' where CMAKE_C_FLAGS was incorrectly assumed to be set. This fixes zephyrproject-rtos#21614 Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
nashif
pushed a commit
that referenced
this issue
Jan 7, 2020
Fix an issue with 'ZEPHYR_TOOLCHAIN_VARIANT=host' where CMAKE_C_FLAGS was incorrectly assumed to be set. This fixes #21614 Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Build System
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
Selecting ZEPHYR_TOOLCHAIN_VARIANT=host on Ubuntu x86_64 causes CMake to bail out with:
To Reproduce
Bug showed up in internal test environment. Don't know whether this hits Zephyr's "normal" usage of the host toolchain.
The problem seems to be that all compiler flags are already compiled in the host compiler and there is no need for CMAKE_C_FLAGS. The code at cmake/compiler/host-gcc/target.cmake is not prepared for an empty CMAKE_C_FLAGS variable.
The following code helped to avoid the bug:
Expected behavior
Host toolchain to work even if CMAKE_C_FLAGS is empty.
Impact
annoyance
Screenshots or console output
N/A
Environment (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: