cpu/atmega_common: do not export LINKFLAGS#10854
Merged
smlng merged 2 commits intoRIOT-OS:masterfrom Jan 24, 2019
Merged
Conversation
It is only used by `Makefile.include` and should not be used by sub-make
instances.
This is required to prevent evaluating `LINKFLAGS` when not needed and a
required step to not evaluate it on the host with for example `avr-ld`
when building in docker.
I checked usage with:
git grep -e '(LINKFLAGS)' -e '{LINKFLAGS}'
Packages may be using it but `LINKFLAGS` is a RIOT way of naming
things and even if `generate-xcompile-toolchain` uses `LINK` it does not
use `LINKFLAGS`.
This prevent evaluating `LINKFLAGS` when not needed and when building in docker so does not produce errors if `avr-ld` is not installed. ``` BUILD_IN_DOCKER=1 BOARD=arduino-mega2560 make --no-print-directory -C examples/hello-world/ clean /srv/ilab-builds/workspace/git/riot_master/makefiles/toolchain/gnu.inc.mk:18: objcopy not found. Hex file will not be created. /bin/sh: 1: avr-ld: not found ``` It removes the `/bin/sh: 1: avr-ld: not found`
aabadie
approved these changes
Jan 23, 2019
Contributor
aabadie
left a comment
There was a problem hiding this comment.
ACK
I confirm this fixes the bug when building in docker and no avr-ld is installed on the host. With avr-ld available and using a build from the host, it still works.
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
cpu/atmega_common: do not export LINKFLAGS
This prevent evaluating
LINKFLAGSwhen not needed and when buildingin docker so does not produce errors if
avr-ldis not installed.It removes the
/bin/sh: 1: avr-ld: not foundTesting procedure
On a machine without
avrinstalled, try compiling in docker for any board usingatmega_common/Makefile.includeand notice the/bin/sh: 1: avr-ld: not founderrors.A shorter output is simply calling
cleanas described in the commit message.With this PR the
avr-ld: not foundshould not be printed anymore.Issues/PRs references
Found while testing
arduino-mega2560on a machine withoutavr.Depends on #10853
Tracking issue on removing exports and immediate evaluations #10850