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

devtools: go: introduce go-cross #22

Merged
merged 1 commit into from
Jan 31, 2017
Merged

devtools: go: introduce go-cross #22

merged 1 commit into from
Jan 31, 2017

Conversation

bboozzoo
Copy link

Poky change 9107d6ca144ac1f6169830dee25dae2dad775333 introduced support for
recipe specific sysroots.

The change follows some prior assumptions about the naming of cross compilation
toolchains. The naming is expected to match -cross- pattern. By convention,
*-cross- prefix is followed by ${TARGET_ARCH} (examples. binutils-cross-arm,
gcc-cross-arm). Since Go cross toolchain is named go-cross, when recipe specific
sysroot is built, the mechanism present in OE-core would not make the toochain
available to the recipe, hence any attempt to build Go code will fail.

On top of this BBCLASSEXTEND = "..cross.." is not a recommended solution for
toolchain like recipes. Upstream suggests sticking to convention of having a
foo-cross recipe and inherit cross inside.

The change introduces a recipe for go-cross that inherits cross class inside.
The recipe produces go-cross-${TARGET_ARCH} package. Recipes that inherit go
will automatically depend on go-cross-${TARGET_ARCH}

The fix should also be compatible with non-rss setups.

@kacf @kraj @mem

Poky change 9107d6ca144ac1f6169830dee25dae2dad775333 introduced support for
recipe specific sysroots.

The change follows some prior assumptions about the naming of cross compilation
toolchains. The naming is expected to match *-cross-* pattern. By convention,
`*-cross-` prefix is followed by ${TARGET_ARCH} (examples. binutils-cross-arm,
gcc-cross-arm). Since Go cross toolchain is named go-cross, when recipe specific
sysroot is built, the mechanism present in OE-core would not make the toochain
available to the recipe, hence any attempt to build Go code will fail.

On top of this BBCLASSEXTEND = "..cross.." is not a recommended solution for
toolchain like recipes. Upstream suggests sticking to convention of having a
`foo-cross` recipe and `inherit cross` inside.

The change introduces a recipe for go-cross that inherits `cross` class inside.
The recipe produces `go-cross-${TARGET_ARCH}` package. Recipes that `inherit go`
will automatically depend on `go-cross-${TARGET_ARCH}`

The fix should also be compatible with non-rss setups.

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Copy link

@kacf kacf left a comment

Choose a reason for hiding this comment

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

Nice!

@mem mem merged commit 66e4db0 into mem:master Jan 31, 2017
@mem
Copy link
Owner

mem commented Jan 31, 2017

Thanks for taking the time to clean all of this up!

@bboozzoo bboozzoo deleted the bboozzoo/rss branch January 31, 2017 06:23
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