make: do not locally export compilation variables#12098
Conversation
Nothing declares this anymore
0fa1e9b to
1933b45
Compare
|
Looks good to me, only removing |
smlng
left a comment
There was a problem hiding this comment.
mhm, somehow the usage of CFLAGS_CPU and its addition to CFLAGS is not very consistent. Its mostly used in makefiles/arch/* but also in boards/common/msba2.
Also I don't understand why it needs to be exported, as it is always added to CFLAGS anyway.
|
@smlng as I put in the commit: "CFLAGS_CPU is required for 'pkg/openthread'. So declare it as a global compilation variable." I do not question why this is there, just it is there, so this PR handles exporting the value as I remove the export in the cpu/arch. |
This is being changes for Unrelated to this PR though. |
|
I found some missing 'export INCLUDES' they were not in my original "grep" command. |
| # the pickit programmer (MPLAB-IPE) wants physical addresses in the hex file!! | ||
| export OBJCOPY = objcopy #use system objcopy as toolchain one is broken. | ||
| export OFLAGS += \ | ||
| OBJCOPY = objcopy #use system objcopy as toolchain one is broken. |
There was a problem hiding this comment.
this also exported in makefiles/toolchain/{llvm,gnu}.inc.mk, don't know if it makes sense to change that here too
There was a problem hiding this comment.
As I said in the PR description "This currently does not un-export them from makefiles/toolchain."
The reasoning is that I prefer changing the toolchain in its specific PR.
It is not supposed to be different, but as it would change almost each line, I think it deserve a smaller PR to ease review.
|
apart from I guess other such as |
|
please squash |
Yes, |
CFLAGS_CPU is required for 'pkg/openthread'. So declare it as a global compilation variable. The goal is to move the export to `makefiles/vars.inc.mk` and remove the local exports that could be in boards/cpu/arch.
CFLAGS and INCLUDES are already exported by `makefiles/vars.inc.mk`. It is a prerequisite to allow handling compilation without global exports.
These are already exported by `makefiles/vars.inc.mk`. It is a prerequisite to allow handling compilation without global exports.
These are already exported by `makefiles/vars.inc.mk`. It is a prerequisite to allow handling compilation without global exports.
These are already exported by `makefiles/vars.inc.mk`. It is a prerequisite to allow handling compilation without global exports.
71cf9f3 to
1be5b7b
Compare
smlng
left a comment
There was a problem hiding this comment.
re-checked exports only in vars.inc.mk (apart from mentioned exceptions), ACK
|
CI is green and it executed as many compilation jobs as nightly "41197" |
|
Thank you for the review. More will be coming :) |
Contribution description
These are already exported by
makefiles/vars.inc.mk.It is a prerequisite to allow handling compilation without global exports.
This currently does not un-export them from
makefiles/toolchain.Testing procedure
All the removed export are exported in
makefiles/vars.inc.mkor not needed in sub-execution.I newly exported
CFLAGS_CPUas it is needed bypkg/openthread.And the
CFLAGS_variables are only used by included files:And there should not be any other changes than these variables and comments except the first two commits changes and the
dist/Makefilecomment.git diff --word-diff $(git merge-base HEAD master) | sed 's/\[-export-\]//g' | sed 's/\[-#.*\]//' | grep -e '{' -e '\[-' [-CFLAGS += $(CFLAGS_BASIC)-] {+#INCLUDES+} += -Iapplication_include {+export CFLAGS_CPU # CPU architecture specific compiler flags+}Issues/PRs references
Part of removing exporting everything everywhere #10850