Skip to content

Conversation

@yseraf
Copy link

@yseraf yseraf commented Jun 16, 2020

Our pull-request #42 was based on our master branch. We had to base this new pull request on feature branch to move forward on the master.

The commit is exactly the same as #42

@mullerch
Copy link

This PR was not completely merged. setup.gmk file changed are not included, therefore the build cannot be done by pre-defining the compiler as expected.

Comment on lines +68 to +72
CC ?= ${TOOLPREFIX}gcc
LD ?= ${TOOLPREFIX}ld
AR ?= ${TOOLPREFIX}ar
OD ?= ${TOOLPREFIX}objdump
OC ?= ${TOOLPREFIX}objcopy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please describe what the intended outcome of this change is?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current makefile gives some constraints:

  1. The toolchain must be in a /toolchain-${platform} folder
  2. Toolchain binaries must reside in a bin folder
  3. All toolchain binaries must reside in the same folder

Constraints 2-3 are generally met by most environments. Constraint 1 is problematic. E.g. in yocto, 1 is not met, 2.3 are.

  • The proposed change: TOOLCHAIN?=${HOME}/toolchain-${platform} removes constraint 1.
  • The one you linked removes constraint 2-3.

In my case (yocto), removing constraint 1 is mandatory.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that yocto does not produce a tree compatible with constraint 2. So both changes are necessary.

Also, note that yocto will by default set CC, LD, ... vars in the build setup process.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a problem because GNU make populates CC and AR with default values. Hence ?= has no effect for those variables unless make is called with -R flag. That's why we cannot simply accept with change.
Thanks for the description of your use case. We will take this into account for future releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants