-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fixed CFLAGS and CXXFLAGS propagation for platform.mk to use #7494
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
Conversation
@@ -8,6 +8,9 @@ | |||
# option. This file may not be copied, modified, or distributed | |||
# except according to those terms. | |||
|
|||
#Expose CFLAGS and CXXFLAGS from configure | |||
CFG_GCCISH_CFLAGS += $(CFLAGS) | |||
CFG_GCCISH_CXXFLAGS += $(CXXFLAGS) |
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.
I think no need to add above 3 lines
there is no CFLAGS, CXXFLAGS flags exported from config.mk
if user environments added like this, user environment flags automatically added may affect compile result.
I think you might have misunderstood the actual intent. make VERBOSE=1 CFLAGS=-m32 Brian confirmed that this was a bug in the make files from what he saw as well, and this fix seemed the appropriate place for me to make the modification that allows the flags to pass. In my testing it seemed to work, but you guys are the experts, I'm still learning the make files and Make itself. |
using CFLAGS like
this CFLAGS will be automatically propagate rust build system accidentally. If you insist to have cflag modification feature in command line with make. However, I think most of CFLAGS of build should be well defined in build script and don't need to be changed. |
I think we can satisfy both @yichoi and @thadguidry by using the GNU make Illustrated below:
So, someone who wants their environment's |
@pnkfelix looks great ! I think below code will be good enough
|
I like the idea also. For Windows users such as myself, modifying the CFLAGS is not going to be a And its good to know that there is a way that solves it without impacting Kudos! On Mon, Jul 1, 2013 at 7:55 AM, yichoi notifications@github.com wrote:
-Thad |
@thadguidry do you think you'll be able to incorporate the changes to use the |
@thadguidry (or is this PR obsolete now that #7547 landed?) |
Note, that in my testing adding @yichoi 's code snippet to platform.mk worked against a make statement of:
So we can always add that back in to platform.mk if we really need command line arguments passed for the CFLAGS and CXXFLAGS. |
I tested this Brian and it seemed to propagate the CFLAGS and CXXFLAGS correctly now.