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

C++ compiler flags are not managed correctly #2007

Closed
zephyrbot opened this issue Jun 14, 2016 · 8 comments
Closed

C++ compiler flags are not managed correctly #2007

zephyrbot opened this issue Jun 14, 2016 · 8 comments
Assignees
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 14, 2016

Reported by Andrew Boie:

In the toplevel Makefile starting around line 600 there are a bunch of KBUILD_CFLAGS that are not propagated to KBUILD_CXXFLAGS. As an example, we never set compiler optimization level when building C++ files.

It's probable that there are a lot of other places in the build where flags are being passed to the C compiler but not C++, grep for KBUILD_CFLAGS to see what I mean.

We really need a better way in the build to express compiler flags that apply equally to C and C++, I don't feel duplicating KBUILD_CFLAGS assignments with KBUILD_CXXFLAGS assignments is a scalable solution for this.

(Imported from Jira ZEP-458)

@zephyrbot
Copy link
Collaborator Author

by Peter Mitsis:

I wonder ... what if we were to introduce a KBUILD_C_CPP_FLAGS variable (or some similar name) for flags/options that are to be common when building for either C or C++. Then, the xxxCFLAGS and xxxCPPFLAGS/CXXFLAGS (I am unsure of the correct names off hand) could be used for ones that are specific to C or C++ respectively. Do you think that would scale any better?

@zephyrbot
Copy link
Collaborator Author

by Andrew Boie:

I don't have a strong opinion on how this gets solved but that seems reasonable.

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Peter Mitsis , what's the current status on fixing this bug?

@zephyrbot
Copy link
Collaborator Author

by Peter Mitsis:

I am migrating off Zephyr to a different group beginning Monday, so I will not be able act on this issue.

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Fixing incorrect priority

@zephyrbot
Copy link
Collaborator Author

by Kuo-Lang Tseng:

Changed to To Do as previous patch was abandoned: https://gerrit.zephyrproject.org/r/#/c/7327/

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Mar 6, 2017

by Kuo-Lang Tseng:

Changed Assignee to "Unassigned" as Juan is working on higher priority one (GH-3246) and not likely to get to this one, given this is low priority one.

@zephyrbot
Copy link
Collaborator Author

by Michał Fita:

{{CPPFLAGS}} are traditionally {color:#14892c}p{color}re{color:#14892c}p{color}rocessor flags, while C++ are traditionally {{CXXFLAGS}}.
{{CXX}}, not {{CPP}} is a C++ compiler.

@zephyrbot zephyrbot added priority: low Low impact/importance bug area: Build System bug The issue is a bug, or the PR is fixing a bug labels Sep 23, 2017
@nashif nashif closed this as completed Feb 7, 2018
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
Projects
None yet
Development

No branches or pull requests

2 participants